'ID', 'mall_id' => 'Mall ID', 'user_id' => 'User ID', 'goods_id' => '商品', 'attr_id' => '商品规格', 'num' => '商品数量', 'mch_id' => '商户id', 'is_delete' => '删除', 'sign' => '标记', 'attr_info' => '规格信息', 'created_at' => 'Created At', 'deleted_at' => 'Deleted At', 'updated_at' => 'Updated At', ]; } public static function cacheStatusGet() { $cart_status_cache = self::CART_STATUS_CACHE . \Yii::$app->user->id; return \Yii::$app->cache->get($cart_status_cache); } public static function cacheStatusSet(bool $info) { $cart_status_cache = self::CART_STATUS_CACHE . \Yii::$app->user->id; \Yii::$app->cache->set($cart_status_cache, $info, 0); } public function getAttrs() { return $this->hasOne(GoodsAttr::className(), ['id' => 'attr_id'])->where(['is_delete' => 0]); } public function getGoods() { return $this->hasOne(Goods::className(), ['id' => 'goods_id']); } public function getStore() { return $this->hasOne(Store::className(), ['mch_id' => 'mch_id']); } }