Files
hpt_inventory/app/Models/SampleSource.php
2026-06-10 16:42:20 +07:00

31 lines
648 B
PHP

<?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');
}
}