32 lines
799 B
PHP
32 lines
799 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
use App\Enums\RecordStatusEnum;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
class TestSampleOrganism extends BaseModel
|
|
{
|
|
public $timestamps = false;
|
|
use HasFactory;
|
|
/**
|
|
* The table associated with the model.
|
|
*
|
|
* @var string
|
|
*/
|
|
|
|
public static function boot()
|
|
{
|
|
parent::boot();
|
|
}
|
|
|
|
protected $fillable = ['test_sample_id','organism_id','is_default', 'lab_id', 'created_at', 'created_by', 'updated_at', 'updated_by', 'record_status_id'];
|
|
|
|
protected $hidden = ['created_at', 'created_by', 'updated_at', 'updated_by'];
|
|
|
|
public function organism(){
|
|
return $this->belongsTo('App\Models\Organism', 'organism_id', 'id')->where(BaseModel::RECORD_STATUS_FIELD, RecordStatusEnum::ACTIVE);
|
|
}
|
|
|
|
|
|
}
|