|
@ -18,6 +18,7 @@ use yii\behaviors\TimestampBehavior; |
|
|
* @property int $goods_count 商品数量 |
|
|
* @property int $goods_count 商品数量 |
|
|
* @property int $created_at 创建时间 |
|
|
* @property int $created_at 创建时间 |
|
|
* @property int $updated_at 更新时间 |
|
|
* @property int $updated_at 更新时间 |
|
|
|
|
|
* @property string $sku_value 商品sku |
|
|
*/ |
|
|
*/ |
|
|
class Cart extends \yii\db\ActiveRecord |
|
|
class Cart extends \yii\db\ActiveRecord |
|
|
{ |
|
|
{ |
|
@ -37,7 +38,7 @@ class Cart extends \yii\db\ActiveRecord |
|
|
return [ |
|
|
return [ |
|
|
[['user_id', 'goods_id', 'goods_name', 'sku_id'], 'required'], |
|
|
[['user_id', 'goods_id', 'goods_name', 'sku_id'], 'required'], |
|
|
[['user_id', 'goods_id', 'goods_img', 'goods_price', 'sku_id', 'goods_count'], 'integer'], |
|
|
[['user_id', 'goods_id', 'goods_img', 'goods_price', 'sku_id', 'goods_count'], 'integer'], |
|
|
[['goods_name'], 'string', 'max' => 120], |
|
|
|
|
|
|
|
|
[['goods_name', 'sku_value'], 'string', 'max' => 120], |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -57,6 +58,7 @@ class Cart extends \yii\db\ActiveRecord |
|
|
'goods_count' => '商品数量', |
|
|
'goods_count' => '商品数量', |
|
|
'created_at' => '创建时间', |
|
|
'created_at' => '创建时间', |
|
|
'updated_at' => '更新时间', |
|
|
'updated_at' => '更新时间', |
|
|
|
|
|
'sku_value' => '商品sku', |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|