diff --git a/app/Models/OrthancHost.php b/app/Models/OrthancHost.php index a0e4ab2..c710624 100644 --- a/app/Models/OrthancHost.php +++ b/app/Models/OrthancHost.php @@ -2,6 +2,4 @@ namespace App\Models; -use Illuminate\Database\Eloquent\Model; - -class OrthancHost extends Model {} +class OrthancHost extends BaseModel {} diff --git a/database/migrations/2024_12_31_074312_create_orthanc_hosts_table.php b/database/migrations/0000_01_31_074312_create_orthanc_hosts_table.php similarity index 52% rename from database/migrations/2024_12_31_074312_create_orthanc_hosts_table.php rename to database/migrations/0000_01_31_074312_create_orthanc_hosts_table.php index 043fdb8..97a0710 100644 --- a/database/migrations/2024_12_31_074312_create_orthanc_hosts_table.php +++ b/database/migrations/0000_01_31_074312_create_orthanc_hosts_table.php @@ -8,14 +8,17 @@ { public function up(): void { - Schema::create('orthanc_hosts', function (Blueprint $table) { + Schema::create('orthanc_hosts', static function (Blueprint $table) { $table->id(); $table->string('server_name')->unique(); - $table->string('fqdn')->unique(); + $table->string('host'); + $table->integer('port'); $table->string('ae_title')->nullable(); - $table->string('stone_viewer_url')->nullable(); - $table->string('ohif_viewer_url')->nullable(); - $table->string('meddream_viewer_url')->nullable(); + $table->string('username')->nullable(); + $table->string('password')->nullable(); + $table->string('stone_viewer_path')->nullable(); + $table->string('ohif_viewer_path')->nullable(); + $table->string('meddream_viewer_path')->nullable(); $table->timestamps(); }); } diff --git a/database/migrations/2024_12_27_060234_create_studies_table.php b/database/migrations/2024_12_27_060234_create_studies_table.php index f22a5a5..133345d 100644 --- a/database/migrations/2024_12_27_060234_create_studies_table.php +++ b/database/migrations/2024_12_27_060234_create_studies_table.php @@ -3,6 +3,7 @@ use App\Domain\Report\ReportStatus; use App\Domain\Study\Priority; use App\Domain\Study\StudyLevelStatus; +use App\Models\OrthancHost; use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; @@ -13,6 +14,7 @@ public function up(): void { Schema::create('studies', function (Blueprint $table) { $table->id(); + $table->foreignIdFor(OrthancHost::class)->index(); $table->string('orthanc_uuid')->unique()->index(); $table->boolean('is_archived')->default(false); $table->unsignedTinyInteger('priority')->default(Priority::Routine);