UserRandSign.php 434 B

12345678910111213141516171819202122
  1. <?php
  2. namespace App\Modules\User\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class UserRandSign extends Model
  5. {
  6. protected $table = 'user_rand_sign';
  7. protected $fillable = ['uid','fee','day'];
  8. static function add($params)
  9. {
  10. return self::create($params);
  11. }
  12. static function hasSigned($params)
  13. {
  14. return self::where('uid',$params['uid'])->where('day',$params['day'])->count();
  15. }
  16. }