AwardLake.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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\system;
  12. use app\model\order\StoreOrder;
  13. use app\model\store\SystemStoreStaff;
  14. use crmeb\basic\BaseModel;
  15. use crmeb\traits\ModelTrait;
  16. use think\model;
  17. /**
  18. * Class UserRecharge
  19. * @package app\model\user
  20. */
  21. class AwardLake extends BaseModel
  22. {
  23. use ModelTrait;
  24. /**
  25. * 数据表主键
  26. * @var string
  27. */
  28. protected $pk = 'id';
  29. /**
  30. * 模型名称
  31. * @var string
  32. */
  33. protected $name = 'award_lake';
  34. protected $insert = ['add_time'];
  35. protected function setAddTimeAttr()
  36. {
  37. return time();
  38. }
  39. /**
  40. * 订单号
  41. * @param Model $query
  42. * @param $value
  43. */
  44. public function searchOrderIdAttr($query, $value)
  45. {
  46. $query->where('link_id', $value);
  47. }
  48. }