|
|
@ -44,8 +44,8 @@ use yii\behaviors\TimestampBehavior; |
|
|
|
*/ |
|
|
|
class Goods extends \yii\db\ActiveRecord |
|
|
|
{ |
|
|
|
public $imagePath; |
|
|
|
public $imageId; |
|
|
|
public $coverImagePath; |
|
|
|
public $coverImageId; |
|
|
|
//是否删除is_delete
|
|
|
|
const IS_DELETE_NO = 0;//未删除
|
|
|
|
const IS_DELETE_YES = 1;//已删除
|
|
|
@ -73,7 +73,7 @@ class Goods extends \yii\db\ActiveRecord |
|
|
|
[['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'], 'required'], |
|
|
|
[['sn'], 'checkExist'], |
|
|
|
[['description', 'imageId'], 'string'], |
|
|
|
[['description', 'coverImageId'], 'string'], |
|
|
|
[['name'], 'string', 'max' => 120], |
|
|
|
[['sn'], 'string', 'max' => 60], |
|
|
|
[['code'], 'string', 'max' => 50], |
|
|
|