Добавлены поля delivery_from_address и delivery_from_object_id
This commit is contained in:
@@ -21,13 +21,17 @@ class MedicalHistoryCorrection extends Model
|
||||
'user_id',
|
||||
'mis_user_id',
|
||||
'comment',
|
||||
'delivery_from_address',
|
||||
'delivery_from_object_id',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'birth_date' => 'datetime',
|
||||
'recipient_date' => 'datetime',
|
||||
'extract_date' => 'datetime',
|
||||
'death_date' => 'datetime',
|
||||
'birth_date' => 'date:Y-m-d',
|
||||
'recipient_date' => 'datetime:Y-m-d H:i:s',
|
||||
'extract_date' => 'datetime:Y-m-d H:i:s',
|
||||
'death_date' => 'datetime:Y-m-d H:i:s',
|
||||
'male' => 'boolean',
|
||||
'delivery_from_object_id' => 'integer'
|
||||
];
|
||||
|
||||
public function medicalHistory()
|
||||
|
||||
@@ -22,7 +22,9 @@ class ReportNursePatient extends Model
|
||||
'visit_result_id',
|
||||
'comment',
|
||||
'user_id',
|
||||
'profit_type_id'
|
||||
'profit_type_id',
|
||||
'delivery_from_address',
|
||||
'delivery_from_object_id',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
@@ -31,6 +33,7 @@ class ReportNursePatient extends Model
|
||||
'extract_date' => 'datetime:Y-m-d H:i:s',
|
||||
'death_date' => 'datetime:Y-m-d H:i:s',
|
||||
'male' => 'boolean',
|
||||
'delivery_from_object_id' => 'integer'
|
||||
];
|
||||
|
||||
public function migrations(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('medical_history_corrections', function (Blueprint $table) {
|
||||
$table->string('delivery_from_address')->nullable();
|
||||
$table->unsignedBigInteger('delivery_from_object_id')->nullable();
|
||||
});
|
||||
Schema::table('report_nurse_patients', function (Blueprint $table) {
|
||||
$table->string('delivery_from_address')->nullable();
|
||||
$table->unsignedBigInteger('delivery_from_object_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('medical_history_corrections', function (Blueprint $table) {
|
||||
$table->dropColumn('delivery_from_address');
|
||||
$table->dropColumn('delivery_from_object_id');
|
||||
});
|
||||
Schema::table('report_nurse_patients', function (Blueprint $table) {
|
||||
$table->dropColumn('delivery_from_address');
|
||||
$table->dropColumn('delivery_from_object_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user