Skip to content

Commit

Permalink
Merge pull request #93 from LavaLite/develop
Browse files Browse the repository at this point in the history
Notification Db folder
  • Loading branch information
georgemjohn authored Jun 29, 2023
2 parents 6c55700 + 227ec3b commit b623150
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Litepie\Notification\Database\Seeders;

use Illuminate\Database\Seeder;

class NotificationTableSeeder extends Seeder
{
public function run()
{

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;

class CreateNotificationTemplatesTable extends Migration
{
/*
* Run the migrations.
*
* @return void
*/

public function up()
{

/*
* Table: notifications
*/
Schema::create('notification_templates', function ($table) {
$table->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');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;

class CreateNotificationsTable extends Migration
{
/*
* Run the migrations.
*
* @return void
*/

public function up()
{

/*
* Table: notifications
*/
Schema::create('notifications', function ($table) {
$table->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');
}
}

0 comments on commit b623150

Please sign in to comment.