/** * @return \yii\db\ActiveQuery */ public function getCoupons() { return $this->hasMany(Coupon::className(), ['coupon_type_id' => 'id']); }