DeliveryService.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\common\model\delivery;
  12. use app\common\model\BaseModel;
  13. use app\common\model\system\merchant\Merchant;
  14. use crmeb\services\DeliverySevices;
  15. class DeliveryService extends BaseModel
  16. {
  17. public static function tablePk(): string
  18. {
  19. return 'service_id';
  20. }
  21. public static function tableName(): string
  22. {
  23. return 'delivery_service';
  24. }
  25. public function searchStatusAttr($query,$value)
  26. {
  27. $query->where('status',$value);
  28. }
  29. public function searchMerIdAttr($query,$value)
  30. {
  31. $query->where('mer_id',$value);
  32. }
  33. public function searchServiceIdAttr($query,$value)
  34. {
  35. $query->where('service_id',$value);
  36. }
  37. public function searchIsDelAttr($query,$value)
  38. {
  39. $query->where('is_del',$value);
  40. }
  41. public function searchTypeAttr($query,$value)
  42. {
  43. $query->where('type',$value);
  44. }
  45. public function searchDateAttr($query,$value)
  46. {
  47. getModelTime($query, $value, 'create_time');
  48. }
  49. }