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