You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UserTaskFinish.php 970B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace app\model\user;
  3. use crmeb\basic\BaseModel;
  4. use crmeb\traits\ModelTrait;
  5. use think\model;
  6. /**
  7. * Class UserTaskFinish
  8. * @package app\model\user
  9. */
  10. class UserTaskFinish extends BaseModel
  11. {
  12. use ModelTrait;
  13. /**
  14. * 数据表主键
  15. * @var string
  16. */
  17. protected $pk = 'id';
  18. /**
  19. * 模型名称
  20. * @var string
  21. */
  22. protected $name = 'user_task_finish';
  23. /**
  24. * 用户uid
  25. * @param Model $query
  26. * @param $value
  27. */
  28. public function searchUidAttr($query, $value)
  29. {
  30. $query->where('uid', $value);
  31. }
  32. /**
  33. * 任务id
  34. * @param Model $query
  35. * @param $value
  36. */
  37. public function searchTaskIdAttr($query, $value)
  38. {
  39. $query->where('task_id', $value);
  40. }
  41. /**
  42. * 状态
  43. * @param Model $query
  44. * @param $value
  45. */
  46. public function searchStatusAttr($query, $value)
  47. {
  48. $query->where('status', $value);
  49. }
  50. }