255], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'store_id' => 'Store ID', 'type' => '1.红包2.优惠卷3.积分4.实物.5.无', 'num' => '积分数量', 'price' => '红包价格', 'image_url' => '图片', 'stock' => '库存', 'orderby' => '排序', 'coupon_id' => '优惠卷', 'gift_id' => '赠品', 'create_time' => 'Create Time', 'update_time' => 'Update Time', 'attr' => '规格', 'name' => '别名' ]; } public function getCoupon() { return $this->hasOne(Coupon::className(), ['id' => 'coupon_id']); } public function getGift() { return $this->hasOne(Goods::className(), ['id' => 'gift_id']); } }