Notification Hospital Portal

This commit is contained in:
ivan-sim
2023-11-20 16:36:27 +07:00
parent 13ef733010
commit 676e541385
12 changed files with 238 additions and 28 deletions

View File

@@ -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.
*
* @return void
*/
public function up()
{
Schema::create('notifications', function (Blueprint $table) {
$table->id();
$table->bigInteger('hospital_id');
$table->string('title', 255);
$table->string('description', 255);
$table->string('avatar', 255)->nullable();
$table->integer('type');
$table->boolean('isUnRead')->default(false);
$table->bigInteger('created_by')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('notifications');
}
};

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('notification_types', function (Blueprint $table) {
$table->id();
$table->string('type', 255);
$table->string('description', 255);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('notification_types');
}
};