mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-24 12:05:39 +08:00
25 lines
539 B
PHP
25 lines
539 B
PHP
<?php
|
|
|
|
namespace App\Repos;
|
|
|
|
use App\Models\CommentLike as CommentLikeModel;
|
|
use Phalcon\Mvc\Model;
|
|
|
|
class CommentLike extends Repository
|
|
{
|
|
|
|
/**
|
|
* @param int $commentId
|
|
* @param int $userId
|
|
* @return CommentLikeModel|Model|bool
|
|
*/
|
|
public function findCommentLike($commentId, $userId)
|
|
{
|
|
return CommentLikeModel::findFirst([
|
|
'conditions' => 'comment_id = :comment_id: AND user_id = :user_id:',
|
|
'bind' => ['comment_id' => $commentId, 'user_id' => $userId],
|
|
]);
|
|
}
|
|
|
|
}
|