diff --git a/src/Litepie/Notification/Database/Seeders/NotificationTableSeeder.php b/src/Litepie/Notification/Database/Seeders/NotificationTableSeeder.php new file mode 100644 index 00000000..a04f392a --- /dev/null +++ b/src/Litepie/Notification/Database/Seeders/NotificationTableSeeder.php @@ -0,0 +1,13 @@ +id(); + $table->string('key', 250)->nullable(); + $table->string('language', 3)->default('en')->nullable(); + $table->string('subject', 100)->nullable(); + $table->text('message')->nullable(); + $table->softDeletes(); + $table->nullableTimestamps(); + }); + } + + /* + * Reverse the migrations. + * + * @return void + */ + + public function down() + { + Schema::drop('notification_templates'); + } +} diff --git a/src/Litepie/Notification/Database/migrations/2023_03_29_100001_create_notifications_table.php b/src/Litepie/Notification/Database/migrations/2023_03_29_100001_create_notifications_table.php new file mode 100644 index 00000000..94ccc893 --- /dev/null +++ b/src/Litepie/Notification/Database/migrations/2023_03_29_100001_create_notifications_table.php @@ -0,0 +1,48 @@ +string('id', 50); + $table->string('type', 250)->nullable(); + $table->string('type_sub', 20)->nullable(); + $table->integer('notifiable_id')->nullable(); + $table->string('notifiable_type', 250)->nullable(); + $table->text('data')->nullable(); + $table->text('message')->nullable(); + $table->text('actions')->nullable(); + $table->string('variant', 20)->nullable(); + $table->tinyInteger('pinned')->nullable(); + $table->dateTime('read_at')->nullable(); + $table->softDeletes(); + $table->nullableTimestamps(); + }); + } + + /* + * Reverse the migrations. + * + * @return void + */ + + public function down() + { + Schema::drop('notifications'); + } +}