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