<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class UserChronicDiseaseVariant extends Model
{
    protected $fillable = ['chronic_disease_id', 'user_id', 'chronic_disease_variant_id'];

    public function user()
    {
        return $this->belongsToMany(User::class, 'user_chronic_disease_variants', 'user_id', 'chronic_disease_id');
    }

    public function chronicDiseaseVariant()
    {
        return $this->belongsTo(ChronicDiseaseVariant::class, 'chronic_disease_variant_id');
    }
}
