OtherOrderStatus.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. /** TODO 订单修改状态记录Model
  16. * Class OtherOrderStatus
  17. * @package app\model\order
  18. */
  19. class OtherOrderStatus extends BaseModel
  20. {
  21. use ModelTrait;
  22. /**
  23. * 模型名称
  24. * @var string
  25. */
  26. protected $name = 'other_order_status';
  27. protected $autoWriteTimestamp = 'int';
  28. protected $createTime = 'change_time';
  29. /**
  30. * 订单ID搜索器
  31. * @param Model $query
  32. * @param $value
  33. * @param $data
  34. */
  35. public function searchOidAttr($query, $value, $data)
  36. {
  37. $query->where('oid', $value);
  38. }
  39. /**
  40. * 变动类型搜索器
  41. * @param Model $query
  42. * @param $value
  43. */
  44. public function searchChangeTypeAttr($query, $value)
  45. {
  46. $query->where('change_type', $value);
  47. }
  48. }