Browse Source

修改商品表商品唯一货号字段

wechat_public_accounts
linyaostalker 5 years ago
parent
commit
a541dd5780
  1. 2
      vendor/antgoods/goods/src/migrations/sql/goods.sql
  2. 2
      vendor/antgoods/goods/src/models/ars/Goods.php

2
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 '重量',

2
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],

Loading…
Cancel
Save