DOrderStatistics.Class.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /**
  3. * 销售订单统计Dao
  4. * Created by PhpStorm.
  5. * User: 小威
  6. * Date: 2019/12/30
  7. * Time: 16:00
  8. */
  9. namespace JinDouYun\Dao\Order;
  10. use JinDouYun\Dao\BaseDao;
  11. class DOrderStatistics extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'order_statistics';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
  19. "orderId", //int(10) NOT NULL COMMENT '订单id',
  20. "orderNo", //int(10) NOT NULL COMMENT '订单no',
  21. "shopId", //int(10) NOT NULL COMMENT '商铺id',
  22. "shopName", //varchar(50) NOT NULL COMMENT '商铺名称',
  23. "outerTradeNo", //varchar(255) NOT NULL DEFAULT '' COMMENT '外部流水号(支付宝/微信返回的流水号)',
  24. "totalMoney", //decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '总金额',
  25. "payAmount", //decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '实付金额',
  26. "buyTotal", //int(10) NOT NULL DEFAULT '0' COMMENT '购买总数',
  27. "customerName", //varchar(50) NOT NULL COMMENT '客户姓名',
  28. "customerId", //int(10) NOT NULL COMMENT '客户id',
  29. "payStatus", //tinyint(3) NOT NULL DEFAULT '4' COMMENT '支付状态 默认 4未支付 5已支付',
  30. "orderStatus", //tinyint(3) NOT NULL DEFAULT '2' COMMENT '订单状态 默认 2待支付 3代发货 4待收货 5已完成 6已关闭',
  31. "payType", //tinyint(3) NOT NULL COMMENT '支付方式 1微信 2支付宝 3货到付款 4上门自提',
  32. "deliveryType", //tinyint(3) NOT NULL COMMENT '配送方式 1商品配送 2上门自提',
  33. "source", //tinyint(3) NOT NULL COMMENT '订单来源 默认1 ios 2android 3小程序 4后台创建',
  34. "remark", //varchar(255) NOT NULL DEFAULT '' 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. "returnStatus", //tinyint(3) NOT NULL DEFAULT '0' COMMENT '退货状态 0:未退货 1:部分退货 2:全部退货',
  38. "outStatus", //tinyint(3) NOT NULL COMMENT '出库状态 4:未出库 5:已出库',
  39. "payTime", //int(10) NOT NULL DEFAULT '0' COMMENT '付款时间',
  40. "createTime", //int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  41. "updateTime", //int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  42. "orderPreferentialActivityId", //int(10) NOT NULL DEFAULT '0' COMMENT '店铺优惠活动id',
  43. "salesManId", //int(10) NOT NULL DEFAULT '0' COMMENT '业务员id',
  44. "salesManName", //varchar(255) NOT NULL COMMENT '业务员名称',
  45. "customerType", //tinyint(3) NOT NULL COMMENT '客户类型',
  46. "userCenterId", //int(10) NOT NULL DEFAULT '0' COMMENT 'userCenterId',
  47. "detailsId", //int(10) NOT NULL COMMENT '详情id',
  48. "goodsCode", //varchar(255) NOT NULL DEFAULT '' COMMENT '商品编号',
  49. "goodsId", //int(10) NOT NULL DEFAULT '0' COMMENT '商品Id',
  50. "goodsName", //varchar(50) NOT NULL DEFAULT '' COMMENT '商品名称',
  51. "categoryId", // int(10) NOT NULL COMMENT '分类id',
  52. "categoryName", // varchar(50) NOT NULL COMMENT '分类名称',
  53. "originPrice", //decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '原始单价',
  54. "detailsBuyNum", //int(10) NOT NULL DEFAULT '0' COMMENT '购买数量',
  55. "preferential", //decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '每/优惠',
  56. "deliverNum", //int(10) NOT NULL DEFAULT '0' COMMENT '发货数量',
  57. "detailsTotalMoney", //decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '小计金额',
  58. "detailsDeleteStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 默认5 正常 4删除',
  59. "detailsReturnStatus", //tinyint(3) NOT NULL COMMENT '退货状态 0:未退货 1:已退货',
  60. "detailsCreateTime", //int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  61. "detailsUpdateTime", //int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  62. "detailsPreferentialActivityId", //int(10) NOT NULL DEFAULT '0' COMMENT '店铺优惠活动id',
  63. "goodsBasicId", //int(10) NOT NULL COMMENT 'goodsBasicId',
  64. "skuId",
  65. "unitName", //varchar(50) NOT NULL COMMENT '单位名称',
  66. "conversion", //decimal(10,2) NOT NULL COMMENT '换算比率',
  67. ];
  68. $this->_readonly = ['id'];
  69. $this->_create_autofill = [
  70. 'createTime' => time()
  71. ];
  72. $this->_update_autofill = [
  73. 'updateTime' => time()
  74. ];
  75. parent::__construct($serviceDB);
  76. }
  77. }