init project

This commit is contained in:
2026-05-25 11:08:52 +07:00
parent a388c619b5
commit 895fdd9b83
1437 changed files with 384844 additions and 27 deletions

30
app/Models/TestGroup.php Normal file
View File

@@ -0,0 +1,30 @@
<?php
namespace App\Models;
use App\Enums\RecordStatusEnum;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class TestGroup extends BaseModel
{
public $timestamps = false;
use HasFactory;
/**
* The table associated with the model.
*
* @var string
*/
protected $table='test_groups';
protected $fillable = ['group_name', 'lab_id', BaseModel::CREATED_AT_FIELD, BaseModel::CREATED_BY_FIELD, BaseModel::UPDATED_AT_FIELD, BaseModel::UPDATED_BY_FIELD, BaseModel::RECORD_STATUS_FIELD];
public static function boot()
{
parent::boot();
}
public function testGroupDetails(){
return $this->hasMany(TestGroupDetail::class, 'test_group_id', 'id')->where([BaseModel::RECORD_STATUS_FIELD => RecordStatusEnum::ACTIVE]);
}
}