mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-22 11:41:27 +08:00
25 lines
527 B
PHP
25 lines
527 B
PHP
<?php
|
|
|
|
namespace App\Repos;
|
|
|
|
use App\Models\ReviewLike as ReviewLikeModel;
|
|
use Phalcon\Mvc\Model;
|
|
|
|
class ReviewLike extends Repository
|
|
{
|
|
|
|
/**
|
|
* @param int $reviewId
|
|
* @param int $userId
|
|
* @return ReviewLikeModel|Model|bool
|
|
*/
|
|
public function findReviewLike($reviewId, $userId)
|
|
{
|
|
return ReviewLikeModel::findFirst([
|
|
'conditions' => 'review_id = :review_id: AND user_id = :user_id:',
|
|
'bind' => ['review_id' => $reviewId, 'user_id' => $userId],
|
|
]);
|
|
}
|
|
|
|
}
|