Browse Source

修改商品模型市场价和销售价字段规则

antshop
linyaostalker 5 years ago
parent
commit
809f8dfecc
  1. 4
      backend/modules/goods/models/ars/Goods.php

4
backend/modules/goods/models/ars/Goods.php

@ -110,7 +110,7 @@ class Goods extends \yii\db\ActiveRecord
public function rules()
{
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', 'sku_mode', 'is_taking', 'is_express', 'express_type'], 'integer'],
[['pid', 'cat_id', 'brand_id', 'shop_cat_id', 'supplier_id', 'weight', 'length', 'width', 'height', 'diameter', 'sold_count', 'limit_count', 'stock', 'stock_warn', 'image', 'model_id', 'is_sale', 'sort_order', 'bouns_points', 'experience_points', 'is_delete', 'express_template', 'sku_mode', 'is_taking', 'is_express', 'express_type'], 'integer'],
[['cat_id', 'brand_id', 'shop_cat_id', 'name'], 'required'],
[['sn'], 'checkExist'],
[['description', 'coverImageId', 'detailImageId'], 'string'],
@ -120,7 +120,7 @@ class Goods extends \yii\db\ActiveRecord
[['unit'], 'string', 'max' => 16],
[['brief'], 'string', 'max' => 255],
[['weight', 'length', 'width', 'height', 'diameter', 'sold_count', 'market_price', 'price', 'uniform_postage'], 'checkNegative'],
[['uniform_postage'], 'safe']
[['uniform_postage', 'market_price', 'price'], 'safe']
];
}

Loading…
Cancel
Save