|
@ -13,7 +13,7 @@ use yii\behaviors\TimestampBehavior; |
|
|
* @property int $pid 父级id |
|
|
* @property int $pid 父级id |
|
|
* @property int $goods_count 商品数量 |
|
|
* @property int $goods_count 商品数量 |
|
|
* @property int $sort_order 排序 |
|
|
* @property int $sort_order 排序 |
|
|
* @property string $icon 图标 |
|
|
|
|
|
|
|
|
* @property int $icon 图标 |
|
|
* @property int $is_show 是否显示,1为不显示 |
|
|
* @property int $is_show 是否显示,1为不显示 |
|
|
* @property int $is_delete 是否删除,1为已删除 |
|
|
* @property int $is_delete 是否删除,1为已删除 |
|
|
* @property int $created_at 创建时间 |
|
|
* @property int $created_at 创建时间 |
|
@ -50,9 +50,8 @@ class Category extends \yii\db\ActiveRecord |
|
|
{ |
|
|
{ |
|
|
return [ |
|
|
return [ |
|
|
[['name'], 'required'], |
|
|
[['name'], 'required'], |
|
|
[['pid', 'goods_count', 'sort_order', 'is_show', 'is_delete'], 'integer'], |
|
|
|
|
|
|
|
|
[['pid', 'goods_count', 'sort_order', 'is_show', 'is_delete', 'icon'], 'integer'], |
|
|
[['name'], 'string', 'max' => 60], |
|
|
[['name'], 'string', 'max' => 60], |
|
|
[['icon'], 'string', 'max' => 64], |
|
|
|
|
|
[['iconImageId'], 'string'], |
|
|
[['iconImageId'], 'string'], |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|