DOrderGoods.Class.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * 订单商品详情Dao
  4. * Created by PhpStorm.
  5. * User: XiaoMing
  6. * Date: 2019/10/31
  7. * Time: 16:04
  8. */
  9. namespace Jobs\Dao\Order;
  10. use Jobs\Dao\BaseDao;
  11. class DOrderGoods extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'order_goods';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT,
  19. "no", //char(20) NOT NULL COMMENT '订单编号',
  20. "orderId", //int(10) NOT NULL DEFAULT '0' COMMENT '订单Id',
  21. "goodsCode", //varchar(255) NOT NULL DEFAULT '' COMMENT '商品编号',
  22. "goodsId", //int(10) NOT NULL DEFAULT '0' COMMENT '商品Id',
  23. "goodsName", //varchar(50) NOT NULL DEFAULT '' COMMENT '商品名称',
  24. "shopId", //int(10) NOT NULL DEFAULT '0' COMMENT '商铺Id',
  25. "shopName", //varchar(50) NOT NULL DEFAULT '' COMMENT '商铺名称',
  26. "originPrice", //decimal(12,2) DEFAULT '0.00' COMMENT '原始单价',
  27. "price", //decimal(12,2) DEFAULT '0.00' COMMENT '商品单价',
  28. "buyNum", //int(10) NOT NULL DEFAULT '0' COMMENT '购买数量',
  29. "preferential", //decimal(12,2) DEFAULT '0.00' COMMENT '每/优惠',
  30. "totalMoney", //decimal(12,2) DEFAULT '0.00' COMMENT '小计金额',
  31. "deliverNum", //int(10) NOT NULL DEFAULT '0' COMMENT '发货数量',
  32. "extends", //json DEFAULT NULL COMMENT '拓展字段',
  33. "deleteStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 默认5 正常 4删除',
  34. "returnStatus", //tinyint(3) DEFAULT '0' COMMENT '退货状态 0:未退货 1:已退货',
  35. "createTime", //int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  36. "updateTime", //int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  37. "preferentialActivityId", //int(10) DEFAULT '0' COMMENT '店铺优惠活动id',
  38. "skuId", //int(10) DEFAULT NULL COMMENT 'skuid',
  39. "goodsBasicId", //int(10) DEFAULT NULL COMMENT 'goodsBasicId',
  40. "unitName", //varchar(50) DEFAULT NULL COMMENT '单位名称',
  41. "conversion", //decimal(10,2) DEFAULT NULL COMMENT '换算比率',
  42. "outCostPrice", //decimal(10,2) DEFAULT NULL COMMENT '成本',
  43. ];
  44. $this->_readonly = ['id'];
  45. $this->_create_autofill = [
  46. 'createTime' => time()
  47. ];
  48. $this->_update_autofill = [
  49. 'updateTime' => time()
  50. ];
  51. parent::__construct($serviceDB);
  52. }
  53. }