1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?php
- /**
- * Created by PhpStorm.
- * User: wxj
- * Date: 2019/10/30
- * Time: 14:17
- */
- namespace JinDouYun\Dao\Goods;
- use JinDouYun\Dao\BaseDao;
- class DGoods extends BaseDao
- {
- public function __construct($serviceDB = 'default')
- {
- $this->_table = 'goods';
- $this->_primary = 'id';
- $this->_fields = [
- "id",//int(11) NOT NULL AUTO_INCREMENT COMMENT '商品id',
- "basicGoodsId",//int(11) NOT NULL COMMENT '关联商品基本资料id',
- "shopId",//int(10) NOT NULL DEFAULT '0' COMMENT '商铺id',
- "merchantId",//int(10) DEFAULT NULL COMMENT '商户id',
- "staffId",//int(10) DEFAULT '0' COMMENT '创建商品员工id',
- "images",//json NOT NULL COMMENT '图集',
- "serviceInfo",//int(11) DEFAULT NULL COMMENT '服务保证',
- "specification",//json DEFAULT NULL COMMENT '商品规格',
- "content",//text COMMENT '商品详情',
- "extend",//json DEFAULT NULL COMMENT '扩展字段',
- "sort",//int(11) DEFAULT '0' COMMENT '排序',
- "isRecommend",//tinyint(4) DEFAULT '4' COMMENT '是否推荐(5是 4否)',
- "deleteStatus",//tinyint(4) DEFAULT '5' COMMENT '删除状态(5未删除 4已删除)',
- "createTime",//int(10) DEFAULT NULL,
- "updateTime",//int(10) DEFAULT NULL COMMENT '修改时间',
- "salesNum",//json DEFAULT NULL COMMENT '销量',
- "enableStatus",//tinyint(1) DEFAULT '4' COMMENT '上下架(5上架 4下架)',
- "specType",//tinyint(3) DEFAULT '1' COMMENT '规格类型 默认1 单规格 2多规格',
- "isJoinCommission",//tinyint(3) DEFAULT '4' COMMENT '是否分销 5参与 4不参与',
- "isDefine",//tinyint(3) DEFAULT '4' COMMENT '是否自定义 分销比例',
- "retType",
- "topTime",//int(10) DEFAULT '0' COMMENT '置顶时间',
- "virtualSalesNum",//varchar(50) DEFAULT '0' COMMENT '虚拟销量',
- "deliverySupIds",//varchar(50) DEFAULT '1,2' COMMENT '物流支持',
- "expressType",//tinyint(3) DEFAULT '1' COMMENT '1 包邮 2 运费模版 3 统一运费',
- "ruleId",//int(10) DEFAULT '0' COMMENT '运费模版id',
- "expressFee",//decimal(10,2) DEFAULT '0.00' COMMENT '统一运费',
- "showExpress",//tinyint(3) DEFAULT '4' COMMENT '是否展示快递 4 步展示 5展示',
- "auditStatus",//tinyint(3) DEFAULT '2' COMMENT '审核状态 默认1 待审 2审核通过 3 审核未通过 4 审核中',
- "isOption",//tinyint(3) DEFAULT '4' COMMENT '5 自选商品',
- "supplierId",//int(10) DEFAULT '0' COMMENT '供应商id',
- "isShield",//tinyint(3) DEFAULT '4' COMMENT '经营范围屏蔽是否开启 4关闭 5开启',
- "notArea",//json DEFAULT NULL COMMENT '地区屏蔽',
- "notCustomerType",//varchar(255) DEFAULT '' COMMENT '屏蔽客户类型 1,2,3',
- "notCustomer",//varchar(255) DEFAULT '' COMMENT '屏蔽客户 1,2',
- "isDistribution",
- "support" ,//varchar(255) DEFAULT NULL COMMENT '商品服务',
- "goodsGroups",// varchar(255) DEFAULT NULL COMMENT '商品分组',
- "realSalesNum",// int(10) DEFAULT NULL COMMENT '真实销量',
- "showMinUnitPrice", //tinyint(3) DEFAULT '4' COMMENT '属性最小单位价格是否展示 默认 4 不展示',
- ];
- $this->_readonly = ['id'];
- $this->_create_autofill = [
- 'createTime' => time()
- ];
- $this->_update_autofill = [
- 'updateTime' => time()
- ];
- parent::__construct($serviceDB);
- }
- }
|