255], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'order_id' => 'Order ID', 'goods_id' => 'Goods ID', 'num' => '商品数量', 'total_price' => '此商品的总价', 'addtime' => 'Addtime', 'is_delete' => 'Is Delete', 'attr' => '商品规格', 'pic' => '商品规格图片', 'integral' => '获取积分', 'is_level' => '会员折扣', ]; } public function getGoods() { return $this->hasOne(Goods::className(), ['id'=>'goods_id']); } public function getOrder() { return $this->hasOne(Order::className(), ['id' => 'order_id']); } }