workflow_level

This commit is contained in:
Dr Masroor Ehsan 2025-01-29 21:24:41 +06:00
parent ef170b5357
commit 3f2a38faa6

View File

@ -1,6 +1,6 @@
<?php <?php
use App\Domain\Report\ReportStatus; use App\Domain\Study\WorkflowLevel;
use App\Models\Department; use App\Models\Department;
use App\Models\Organization; use App\Models\Organization;
use App\Models\Study; use App\Models\Study;
@ -15,7 +15,7 @@ public function up(): void
{ {
Schema::create('study_reports', function (Blueprint $table) { Schema::create('study_reports', function (Blueprint $table) {
$table->id(); $table->id();
$table->unsignedTinyInteger('report_status')->default(ReportStatus::Unread->value); $table->unsignedTinyInteger('workflow_level')->default(WorkflowLevel::Received->value);
$table->string('accession_number', 64)->unique()->index()->default(DB::raw("concat('REP-', gen_random_uuid())")); $table->string('accession_number', 64)->unique()->index()->default(DB::raw("concat('REP-', gen_random_uuid())"));
$table->foreignIdFor(Organization::class)->index()->nullable()->constrained()->nullOnDelete(); $table->foreignIdFor(Organization::class)->index()->nullable()->constrained()->nullOnDelete();