<?php

namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class SampleSource extends BaseModel
{
    public $timestamps = false;
    use HasFactory;
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $fillable = ['name_en', 'name_kh', 'lab_id','is_default'];

    public static function boot()
    {
        parent::boot();
    }

    public function lab(){
        return $this->belongsTo('App\Models\Laboratory', 'lab_id','id');
    }

    public function telegramChatId(){
        return $this->belongsTo(SampleSourceTelegram::class,'id', 'sample_source_id');
    }

}
