StoreOrderStatus.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 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\order;
  12. use crmeb\basic\BaseModel;
  13. use crmeb\traits\ModelTrait;
  14. use think\Model;
  15. /**
  16. * TODO 订单修改状态记录Model
  17. * Class StoreOrderStatus
  18. * @package app\model\order
  19. */
  20. class StoreOrderStatus extends BaseModel
  21. {
  22. use ModelTrait;
  23. /**
  24. * 模型名称
  25. * @var string
  26. */
  27. protected $name = 'store_order_status';
  28. protected $autoWriteTimestamp = 'int';
  29. protected $createTime = 'change_time';
  30. /**
  31. * 订单ID搜索器
  32. * @param Model $query
  33. * @param $value
  34. * @param $data
  35. */
  36. public function searchOidAttr($query, $value, $data)
  37. {
  38. $query->where('oid', $value);
  39. }
  40. /**
  41. * 变动类型搜索器
  42. * @param Model $query
  43. * @param $value
  44. */
  45. public function searchChangeTypeAttr($query, $value)
  46. {
  47. $query->where('change_type', $value);
  48. }
  49. }