|
@ -28,9 +28,13 @@ use yii\behaviors\TimestampBehavior; |
|
|
* @property int $is_delete 是否删除,1为已删除 |
|
|
* @property int $is_delete 是否删除,1为已删除 |
|
|
* @property int $created_at 创建时间 |
|
|
* @property int $created_at 创建时间 |
|
|
* @property int $updated_at 更新时间 |
|
|
* @property int $updated_at 更新时间 |
|
|
|
|
|
* @property int $is_manaul 是否手动 |
|
|
*/ |
|
|
*/ |
|
|
class GoodsSku extends \yii\db\ActiveRecord |
|
|
class GoodsSku extends \yii\db\ActiveRecord |
|
|
{ |
|
|
{ |
|
|
|
|
|
//是否手动is_manaul
|
|
|
|
|
|
const IS_MANUAL_YES = 1; //是手动
|
|
|
|
|
|
const IS_MANUAL_NO = 0; //不是手动
|
|
|
//是否删除is_delete
|
|
|
//是否删除is_delete
|
|
|
const IS_DELETE_NO = 0;//未删除
|
|
|
const IS_DELETE_NO = 0;//未删除
|
|
|
const IS_DELETE_YES = 1;//已删除
|
|
|
const IS_DELETE_YES = 1;//已删除
|
|
@ -49,7 +53,7 @@ class GoodsSku extends \yii\db\ActiveRecord |
|
|
{ |
|
|
{ |
|
|
return [ |
|
|
return [ |
|
|
[['goods_id', 'goods_sn'], 'required'], |
|
|
[['goods_id', 'goods_sn'], 'required'], |
|
|
[['goods_id', 'weight', 'length', 'width', 'height', 'diameter', 'sold_count', 'stock', 'market_price', 'price', 'model_id', 'is_sale', 'sort_order', 'is_delete'], 'integer'], |
|
|
|
|
|
|
|
|
[['goods_id', 'weight', 'length', 'width', 'height', 'diameter', 'sold_count', 'stock', 'market_price', 'price', 'model_id', 'is_sale', 'sort_order', 'is_delete', 'is_manaul'], 'integer'], |
|
|
[['goods_code'], 'string', 'max' => 50], |
|
|
[['goods_code'], 'string', 'max' => 50], |
|
|
[['goods_sn', 'goods_attr'], 'string', 'max' => 60], |
|
|
[['goods_sn', 'goods_attr'], 'string', 'max' => 60], |
|
|
]; |
|
|
]; |
|
|