From a541dd5780937f58068e7217182d58cdd9adb635 Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Wed, 20 Nov 2019 20:23:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=95=86=E5=93=81=E8=A1=A8?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=94=AF=E4=B8=80=E8=B4=A7=E5=8F=B7=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/antgoods/goods/src/migrations/sql/goods.sql | 2 +- vendor/antgoods/goods/src/models/ars/Goods.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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],