UserTaskFinish.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\model\user;
  12. use crmeb\basic\BaseModel;
  13. use crmeb\traits\ModelTrait;
  14. use think\model;
  15. /**
  16. * Class UserTaskFinish
  17. * @package app\model\user
  18. */
  19. class UserTaskFinish extends BaseModel
  20. {
  21. use ModelTrait;
  22. /**
  23. * 数据表主键
  24. * @var string
  25. */
  26. protected $pk = 'id';
  27. /**
  28. * 模型名称
  29. * @var string
  30. */
  31. protected $name = 'user_task_finish';
  32. /**
  33. * 用户uid
  34. * @param Model $query
  35. * @param $value
  36. */
  37. public function searchUidAttr($query, $value)
  38. {
  39. $query->where('uid', $value);
  40. }
  41. /**
  42. * 任务id
  43. * @param Model $query
  44. * @param $value
  45. */
  46. public function searchTaskIdAttr($query, $value)
  47. {
  48. $query->where('task_id', $value);
  49. }
  50. /**
  51. * 状态
  52. * @param Model $query
  53. * @param $value
  54. */
  55. public function searchStatusAttr($query, $value)
  56. {
  57. $query->where('status', $value);
  58. }
  59. }