_table = 'goods_basic'; $this->_primary = 'id'; $this->_fields = [ "id", //int(10) NOT NULL AUTO_INCREMENT, "images", //json DEFAULT NULL COMMENT '商品相册', "title", //varchar(255) NOT NULL DEFAULT '' COMMENT '商品名称', "code", //varchar(255) NOT NULL DEFAULT '' COMMENT '商品编码', "barCode", //varchar(255) NOT NULL DEFAULT '' COMMENT '商品条码', "categoryId", //int(10) NOT NULL default '0' COMMENT '商品分类id', "categoryPath", //varchar(50) NOT NULL default '' COMMENT '商品分类路径', "expireTime", //int(10) NOT NULL default '0' COMMENT '过期时间', "brandId", //int(10) NOT NULL default '0' COMMENT '品牌id', 'describe', // 商品描述 "tag", //varchar(255) NOT NULL DEFAULT '' COMMENT '关键词', "link", //varchar(255) NOT NULL DEFAULT '' COMMENT 'link', "description", //text NOT NULL COMMENT '商品详情', "noSalesShop", //json DEFAULT NULL COMMENT '禁止销售店铺', "extends", //json DEFAULT NULL COMMENT '拓展字段', "enableStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '商品状态 默认5 上线 6下线', "deleteStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 4 删除 5正常', "createTime", //int(10) NOT NULL DEFAULT '0' COMMENT '创建时间', "updateTime", //int(10) NOT NULL DEFAULT '0' COMMENT '更新时间', ]; $this->_readonly = ['id']; $this->_create_autofill = [ 'createTime' => time() ]; $this->_update_autofill = [ 'updateTime' => time() ]; parent::__construct($serviceDB); } }