hasOne(CouponBill::class,"coupon_id","id"); } public function account() { return $this->hasOne(Account::class,"user_code","consumer_code"); } public function business() { return $this->hasOne(Business::class,"code","business_code"); } public function couponMain() { return $this->hasOne(CouponMain::class, 'id', 'coupon_id'); } public function scoreModel() { return $this->hasOne(Score::class, 'coupon_id', 'id'); } public function redpack() { return $this->hasOne(Redpack::class, 'coupon_id', 'id'); } }