255], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'store_id' => 'Store ID', 'type' => '1.红包2.优惠卷3.积分4.实物', 'num' => '积分数量', 'price' => '红包价格', 'stock' => '库存', 'coupon_id' => '优惠卷', 'gift_id' => '赠品', 'create_time' => 'Create Time', 'update_time' => 'Update Time', 'attr' => '规格', 'status' => '0关闭 1开启', 'is_delete' => '删除', ]; } public function getCoupon() { return $this->hasOne(Coupon::className(), ['id' => 'coupon_id']); } public function getGift() { return $this->hasOne(Goods::className(), ['id' => 'gift_id']); } }