DOrder.Class.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?php
  2. /**
  3. * 订单Dao
  4. * Created by PhpStorm.
  5. * User: XiaoMing
  6. * Date: 2019/10/31
  7. * Time: 15:49
  8. */
  9. namespace JinDouYun\Dao\Order;
  10. use JinDouYun\Dao\BaseDao;
  11. class DOrder extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'order';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT,
  19. "no", //char(20) NOT NULL COMMENT '订单编号',
  20. "shopId", //int(10) NOT NULL DEFAULT '0' COMMENT '店铺id',
  21. "shopName",//varchar(50) NOT NULL COMMENT '店铺名称',
  22. "merchantId", // int(10) DEFAULT NULL COMMENT '商户id',
  23. "outerTradeNo", //varchar(255) NOT NULL DEFAULT '' COMMENT '外部流水号(支付宝/微信返回的流水号)',
  24. "totalMoney", //decimal(12,2) DEFAULT '0.00' COMMENT '总金额',
  25. "payAmount", //decimal(12,2) DEFAULT '0.00' COMMENT '实付金额',
  26. 'notPayMoney',
  27. "retMoney",//退款金额
  28. "retTime",//退款时间
  29. "isRet",//订单是否退款
  30. "buyTotal", //int(10) NOT NULL DEFAULT '0' COMMENT '购买总数',
  31. "customerName", //varchar(50) NOT NULL COMMENT '客户姓名',
  32. "customerId", //int(10) NOT NULL COMMENT '客户id',
  33. "payStatus", //tinyint(3) NOT NULL DEFAULT '1' COMMENT '支付状态 默认1 未支付 2已支付',
  34. "orderStatus", //tinyint(3) NOT NULL DEFAULT '2' COMMENT '订单状态 默认 2待支付 3代发货 4待收货 5已完成 6已关闭',
  35. "payType", //tinyint(3) DEFAULT NULL COMMENT '支付方式 1微信 2支付宝 3货到付款 4上门自提',
  36. "deliveryType", //tinyint(3) DEFAULT NULL COMMENT '配送方式 1商品配送 2上门自提',
  37. "source", //tinyint(3) DEFAULT NULL COMMENT '订单来源 默认1 ios 2android 3小程序 4后台创建',
  38. "remark", //varchar(255) NOT NULL DEFAULT '' COMMENT '订单备注',
  39. "extends", //json DEFAULT NULL COMMENT '拓展字段',
  40. "deleteStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 默认5 正常 4删除',
  41. "auditStatus", //tinyint(3) NOT NULL DEFAULT '1' COMMENT '审核状态 默认1 待审 2审核通过 3 审核未通过 4 审核中',
  42. 'returnStatus',//tinyint(3) DEFAULT '0' COMMENT '退货状态 0:未退货 1:部分退货 2:全部退货',
  43. 'outStatus',//tinyint(3) DEFAULT NULL COMMENT '出库状态 4:未出库 5:已出库 6部分出库',
  44. "payTime", //int(10) NOT NULL DEFAULT '0' COMMENT '付款时间',
  45. "createTime", //int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  46. "updateTime", //int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  47. "preferentialActivityId", //int(10) DEFAULT '0' COMMENT '店铺优惠活动id',
  48. "salesManId", //int(10) DEFAULT '0' COMMENT '业务员id',
  49. "salesManName", //varchar(255) DEFAULT NULL COMMENT '业务员名称',
  50. "customerType", //tinyint(3) DEFAULT NULL COMMENT '客户类型',
  51. "userCenterId", //int(10) DEFAULT NULL COMMENT 'userCenterId',
  52. "customerOwe",//decimal(12,2) DEFAULT '0.00' COMMENT '客户当前欠款',
  53. "successFullyTime",//int(10) DEFAULT '0' COMMENT '订单完成时间',
  54. "preferential",//decimal(12,2) DEFAULT '0.00' COMMENT '优惠券优惠金额',
  55. "vipDiscount",//decimal(12,2) DEFAULT '0.00' COMMENT '会员卡优惠金额',
  56. "vipDoubleDiscount",//decimal(12,2) DEFAULT '0.00' COMMENT '会员卡折上折优惠金额',
  57. "vipCardId",//int(10) DEFAULT '0' COMMENT '使用会员卡id',
  58. "verifyCode",//varchar(50) NOT NULL DEFAULT '' COMMENT '核销码',
  59. "originPayAmount",//decimal(12,2) DEFAULT '0.00' COMMENT '原付款金额',
  60. "orderType",//tinyint(3) DEFAULT 1 COMMENT '单据类型 1:销售订单(购物车正常购买的) 23:销售单(后台快速创建的)',
  61. "outTime",//varchar(50) NOT NULL DEFAULT '' COMMENT '出库时间',
  62. "isCommission",
  63. "commissionData",
  64. "expressMoney",
  65. "deliveryNo",
  66. "expressName",
  67. "expressId",
  68. "selfRuleId",
  69. "selfRuleData",
  70. "cashierUid",
  71. "guideUids",
  72. "cashierName",
  73. "guideName",
  74. "remMoney",
  75. "changeSubMoney",
  76. "isNoneUser",
  77. "customerMobile",
  78. "currentAccountName",
  79. "accountList",
  80. "receivedMoney",
  81. "totalReduceMoney",
  82. "serialNum",
  83. "operatorName",
  84. "operatorId",
  85. "isSettel",
  86. "reservoir",//库位信息
  87. "comBinId",
  88. "revokeTime",//审核驳回时间
  89. "logisticsData",//物流信息
  90. "driverId",// int(10) DEFAULT NULL COMMENT '物流表司机id',
  91. ];
  92. $this->_readonly = ['id'];
  93. $this->_create_autofill = [
  94. 'createTime' => time()
  95. ];
  96. $this->_update_autofill = [
  97. 'updateTime' => time()
  98. ];
  99. parent::__construct($serviceDB);
  100. }
  101. }