DOrderGoods.Class.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /**
  3. * 订单商品详情Dao
  4. * Created by PhpStorm.
  5. * User: XiaoMing
  6. * Date: 2019/10/31
  7. * Time: 16:04
  8. */
  9. namespace JinDouYun\Dao\Order;
  10. use JinDouYun\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(25) 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. "merchantId", //int(10) DEFAULT NULL COMMENT '商户id',
  27. "originPrice", //decimal(12,2) DEFAULT '0.00' COMMENT '原始单价',
  28. "price", //decimal(12,2) DEFAULT '0.00' COMMENT '商品单价',
  29. "buyNum", //double(10,4) NOT NULL DEFAULT '0.0000' COMMENT '购买数量',
  30. "otherNum", //decimal(10,4) NOT NULL DEFAULT '0.0000' COMMENT '其他单位数量',
  31. "preferential", //decimal(12,2) DEFAULT '0.00' COMMENT '优惠券优惠金额',
  32. "totalMoney", //decimal(12,2) DEFAULT '0.00' COMMENT '小计金额',
  33. "deliverNum", //decimal(10,4) NOT NULL DEFAULT '0.0000' COMMENT '发货数量',
  34. "extends", //json DEFAULT NULL COMMENT '拓展字段',
  35. "deleteStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 默认5 正常 4删除',
  36. "returnStatus", //tinyint(3) DEFAULT '0' COMMENT '退货状态 0:未退货 1:已退货',
  37. "createTime", //int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  38. "updateTime", //int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  39. "preferentialActivityId", //int(10) DEFAULT '0' COMMENT '店铺优惠活动id',
  40. "skuId", //int(10) DEFAULT NULL COMMENT 'skuid',
  41. "goodsBasicId", //int(10) DEFAULT NULL COMMENT 'goodsBasicId',
  42. "unitName", //varchar(50) DEFAULT NULL COMMENT '单位名称',
  43. "conversion", //decimal(10,2) DEFAULT NULL COMMENT '换算比率',
  44. "outCostPrice", //decimal(10,2) DEFAULT NULL COMMENT '成本',
  45. "outNum", //decimal(10,4) DEFAULT '0.0000' COMMENT '出库数量',
  46. "outOfNum", //decimal(10,4) DEFAULT '0.0000' COMMENT '未出库数量',
  47. "outStatus", //tinyint(1) DEFAULT NULL COMMENT '出库状态 1:未出库 2:全部出库 3:部分出库',
  48. "vipDiscount", //decimal(12,2) DEFAULT '0.00' COMMENT '会员卡优惠金额',
  49. "categoryPath", //varchar(50) DEFAULT '' COMMENT '分类路径',
  50. "isGiveaway", //tinyint(1) NOT NULL DEFAULT '4' COMMENT '是否赠品 4:否 5:是',
  51. "brandId", //int(5) DEFAULT '0' COMMENT '品牌id',
  52. "specGroup", //json DEFAULT NULL COMMENT '规格明细',
  53. "goodsImages", //varchar(255) DEFAULT '' COMMENT '商品图',
  54. "categoryName", //varchar(255) DEFAULT '' COMMENT '分类名称',
  55. "brandName", //varchar(255) DEFAULT '' COMMENT '品牌名称',
  56. "barCode", //char(50) DEFAULT '' COMMENT '商品条码',
  57. "storageCode", //varchar(50) DEFAULT '' COMMENT '商品货架编码',
  58. "activityExt", //json DEFAULT NULL COMMENT '商品活动数据',
  59. "expressMoney", //decimal(10,2) DEFAULT '0.00' COMMENT '运费',
  60. "isEq", //tinyint(3) DEFAULT '4' COMMENT '是否是超码商品',
  61. ];
  62. $this->_readonly = ['id'];
  63. $this->_create_autofill = [
  64. 'createTime' => time()
  65. ];
  66. $this->_update_autofill = [
  67. 'updateTime' => time()
  68. ];
  69. parent::__construct($serviceDB);
  70. }
  71. }