diff --git a/vendor/antgoods/goods/src/migrations/sql/goods.sql b/vendor/antgoods/goods/src/migrations/sql/goods.sql index f744a0b..fe9d9e2 100755 --- a/vendor/antgoods/goods/src/migrations/sql/goods.sql +++ b/vendor/antgoods/goods/src/migrations/sql/goods.sql @@ -6,7 +6,7 @@ CREATE TABLE `antgoods_goods` ( `brand_id` int(11) NOT NULL COMMENT '品牌id', `shop_cat_id` int(11) NOT NULL COMMENT '前端商品类别id', `name` varchar(120) NOT NULL COMMENT '商品名称', - `sn` varchar(60) NOT NULL COMMENT '商品唯一货号', + `sn` varchar(60) DEFAULT NULL COMMENT '商品唯一货号', `code` varchar(50) DEFAULT NULL COMMENT '商品货码', `supplier_id` int(11) DEFAULT NULL COMMENT '供应商id', `weight` mediumint(8) DEFAULT NULL COMMENT '重量', diff --git a/vendor/antgoods/goods/src/models/ars/Goods.php b/vendor/antgoods/goods/src/models/ars/Goods.php index 0a102b9..85c68dc 100644 --- a/vendor/antgoods/goods/src/models/ars/Goods.php +++ b/vendor/antgoods/goods/src/models/ars/Goods.php @@ -69,7 +69,7 @@ class Goods extends \yii\db\ActiveRecord { return [ [['pid', 'cat_id', 'brand_id', 'shop_cat_id', 'supplier_id', 'weight', 'length', 'width', 'height', 'diameter', 'sold_count', 'limit_count', 'stock', 'stock_warn', 'market_price', 'price', 'image', 'model_id', 'is_sale', 'sort_order', 'bouns_points', 'experience_points', 'is_delete', 'express_template'], 'integer'], - [['cat_id', 'brand_id', 'shop_cat_id', 'name', 'sn'], 'required'], + [['cat_id', 'brand_id', 'shop_cat_id', 'name'], 'required'], [['sn'], 'checkExist'], [['description'], 'string'], [['name'], 'string', 'max' => 120],