You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
1.9 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <?php
  2. namespace App\Model;
  3. class OrderMain extends Model
  4. {
  5. // 线上订单,外卖
  6. const ORDER_TYPE_ONLINE = 1;
  7. // 线下订单,当面付
  8. const ORDER_TYPE_OFFLINE = 4;
  9. const ORDER_DEL_YES = 1;
  10. const ORDER_DEL_NO = 2;
  11. // 订单状态
  12. // 待付款
  13. const ORDER_STATE_UNPAY = 1;
  14. // 待接单
  15. const ORDER_STATE_UNTAKE = 2;
  16. // 待送达
  17. const ORDER_STATE_DELIVERY = 3;
  18. // 已完成
  19. const ORDER_STATE_COMPLETE = 4;
  20. // 已评价
  21. const ORDER_STATE_EVALUATED = 5;
  22. // 已取消
  23. const ORDER_STATE_CANCEL = 6;
  24. // 已拒单
  25. const ORDER_STATE_REFUSE = 7;
  26. // 退款中
  27. const ORDER_STATE_REFUNDING = 8;
  28. // 已退款
  29. const ORDER_STATE_REFUNDED = 9;
  30. // 拒绝退款
  31. const ORDER_STATE_UNREFUND = 10;
  32. // 完成状态组合
  33. const ORDER_STATE_FINISH = [self::ORDER_STATE_COMPLETE, self::ORDER_STATE_EVALUATED, self::ORDER_STATE_UNREFUND];
  34. // 订单支付方式
  35. // 微信支付
  36. const ORDER_PAY_WX = 1;
  37. // 余额支付
  38. const ORDER_PAY_BALANCE = 2;
  39. protected $table = 'ims_cjdc_order_main';
  40. public $timestamps = false;
  41. protected $fillable = [
  42. 'order_num',
  43. 'delivery_no',
  44. 'dada_fee',
  45. 'market_id',
  46. 'user_id',
  47. 'money',
  48. 'box_money',
  49. 'ps_money',
  50. 'mj_money',
  51. 'xyh_money',
  52. 'yhq_money',
  53. 'yhq_money2',
  54. 'zk_money',
  55. 'tel',
  56. 'name',
  57. 'address',
  58. 'area',
  59. 'lat',
  60. 'lng',
  61. 'note',
  62. 'type',
  63. 'form_id',
  64. 'form_id2',
  65. 'delivery_time',
  66. 'pay_type',
  67. 'order_type',
  68. 'code',
  69. 'coupon_id',
  70. 'coupon_id2',
  71. 'uniacid',
  72. 'state',
  73. 'dm_state',
  74. 'time',
  75. 'time_add',
  76. 'pay_time',
  77. 'jj_note',
  78. 'global_order_id',
  79. 'store_ids',
  80. ];
  81. }