DOrder.Class.php 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * 订单Dao
  4. * Created by PhpStorm.
  5. * User: XiaoMing
  6. * Date: 2019/10/31
  7. * Time: 15:49
  8. */
  9. namespace Jobs\Dao\Order;
  10. use Jobs\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",
  22. "outerTradeNo", //varchar(255) NOT NULL DEFAULT '' COMMENT '外部流水号(支付宝/微信返回的流水号)',
  23. "totalMoney", //decimal(12,2) DEFAULT '0.00' COMMENT '总金额',
  24. "payAmount", //decimal(12,2) DEFAULT '0.00' COMMENT '实付金额',
  25. "buyTotal", //int(10) NOT NULL DEFAULT '0' COMMENT '购买总数',
  26. "customerName", //varchar(50) NOT NULL COMMENT '客户姓名',
  27. "customerId", //int(10) NOT NULL COMMENT '客户id',
  28. "payStatus", //tinyint(3) NOT NULL DEFAULT '1' COMMENT '支付状态 默认1 未支付 2已支付',
  29. "orderStatus", //tinyint(3) NOT NULL DEFAULT '2' COMMENT '订单状态 默认 2待支付 3代发货 4待收货 5已完成 6已关闭',
  30. "payType", //tinyint(3) DEFAULT NULL COMMENT '支付方式 1微信 2支付宝 3货到付款 4上门自提',
  31. "deliveryType", //tinyint(3) DEFAULT NULL COMMENT '配送方式 1商品配送 2上门自提',
  32. "source", //tinyint(3) DEFAULT NULL COMMENT '订单来源 默认1 ios 2android 3小程序 4后台创建',
  33. "remark", //varchar(255) NOT NULL DEFAULT '' COMMENT '订单备注',
  34. "extends", //json DEFAULT NULL COMMENT '拓展字段',
  35. "deleteStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 默认5 正常 4删除',
  36. "auditStatus", //tinyint(3) NOT NULL DEFAULT '1' COMMENT '审核状态 默认1 待审 2审核通过 3 审核未通过 4 审核中',
  37. "payTime", //int(10) NOT NULL DEFAULT '0' COMMENT '付款时间',
  38. "createTime", //int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  39. "updateTime", //int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  40. "preferentialActivityId", //int(10) DEFAULT '0' COMMENT '店铺优惠活动id',
  41. "salesManId", //int(10) DEFAULT '0' COMMENT '业务员id',
  42. "salesManName", //varchar(255) DEFAULT NULL COMMENT '业务员名称',
  43. "customerType", //tinyint(3) DEFAULT NULL COMMENT '客户类型',
  44. "userCenterId", //int(10) DEFAULT NULL COMMENT 'userCenterId',
  45. ];
  46. $this->_readonly = ['id'];
  47. $this->_create_autofill = [
  48. 'createTime' => time()
  49. ];
  50. $this->_update_autofill = [
  51. 'updateTime' => time()
  52. ];
  53. parent::__construct($serviceDB);
  54. }
  55. }