255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'mall_id' => 'Mall ID', 'user_id' => '用户', 'coupon_id' => '优惠券', 'sub_price' => '满减', 'discount' => '折扣', 'discount_limit' => '折扣优惠上限', 'coupon_min_price' => '最低消费金额', 'type' => '优惠券类型:1=折扣,2=满减', 'start_time' => '有效期开始时间', 'end_time' => '有效期结束时间', 'is_use' => '是否已使用:0=未使用,1=已使用', 'is_delete' => '删除', 'created_at' => 'Created At', 'updated_at' => 'Updated At', 'deleted_at' => 'Deleted At', 'receive_type' => '获取方式', 'coupon_data' => '优惠券信息json格式', ]; } public function getAuto() { return $this->hasOne(UserCouponAuto::className(), ['user_coupon_id' => 'id']); } public function getCoupon() { return $this->hasOne(Coupon::className(), ['id' => 'coupon_id']); } public function getUser() { return $this->hasOne(User::className(), ['id' => 'user_id']); } }