其余文件

This commit is contained in:
2026-04-14 17:46:22 +08:00
parent 294b68fe37
commit 3691f4db22
1343 changed files with 189847 additions and 0 deletions

View File

@ -0,0 +1,31 @@
<?php
namespace app\api\validate;
use app\common\basics\Validate;
use app\common\model\sign_daily\UserSign;
/**
* 签到验证
* Class Sign
* @package app\api\validate
*/
class SignValidate extends Validate
{
protected $rule = [
'user_id' => 'checkSign',
];
public function checkSign($value, $data, $rule)
{
$today = UserSign::where(['del' => 0, 'user_id' => $value])
->whereTime('sign_time', 'today')
->findOrEmpty();
if (!$today->isEmpty()) {
return '您今天已签到过了';
}
return true;
}
}