1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- /**
- * 规格
- * Created by PhpStorm.
- * User: XiaoMing
- * Date: 2019/11/18
- * Time: 18:25
- */
- namespace JinDouYun\Dao\GoodsManage;
- use JinDouYun\Dao\BaseDao;
- class DSku extends BaseDao
- {
- public function __construct($serviceDB = 'default')
- {
- $this->_table = 'sku';
- $this->_primary = 'id';
- $this->_fields = [
- "id",//int(10) NOT NULL AUTO_INCREMENT,
- "goodsId",//int(10) NOT NULL DEFAULT '0' COMMENT '商品id',
- "conversion",//decimal(10,2) DEFAULT NULL COMMENT '换算比率',
- "unitId",//int(10) DEFAULT NULL COMMENT '单位id',
- "unitName",//varchar(50) DEFAULT '' COMMENT '单位名称',
- "isMaster",//tinyint(3) DEFAULT '4' COMMENT '是否主单位 默认4 否 5是',
- "deleteStatus",//tinyint(3) DEFAULT '5' COMMENT '是否删除 默认5 正常 4删除',
- "extends",//json DEFAULT NULL COMMENT '拓展字段',
- "createTime",//int(10) DEFAULT '0' COMMENT '创建时间',
- "updateTime",//int(10) DEFAULT '0' COMMENT '更新时间',
- "specType",//tinyint(3) DEFAULT '1' COMMENT '规格类型 默认1 单规格 2多规格',
- "specImage",//json DEFAULT NULL COMMENT '规格图片',
- "specData",//json DEFAULT NULL COMMENT '规格明细',
- "specGroupHash",// varchar(255) NOT NULL DEFAULT '' COMMENT '属性明细hash',
- "barCode",//varchar(255) NOT NULL DEFAULT '' COMMENT '条码',
- 'isDefault',//是否默认 4=>否 5=>是
- 'weight',
- 'isNew'
- ];
- $this->_readonly = ['id'];
- $this->_create_autofill = [
- 'createTime' => time()
- ];
- $this->_update_autofill = [
- 'updateTime' => time()
- ];
- parent::__construct($serviceDB);
- }
- }
|