This commit is contained in:
iVampireSP.com 2023-02-02 20:20:03 +08:00
parent d5dc9c2350
commit 7992286367
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132
2 changed files with 5 additions and 6 deletions

View File

@ -19,9 +19,9 @@ public function up(): void
$table->decimal('balance', 20, 4)->default(0)->index(); $table->decimal('balance', 20, 4)->default(0)->index();
$table->string('api_token')->nullable()->unique(); $table->string('api_token')->nullable()->unique();
$table->string('url')->nullable()->index(); $table->string('url')->nullable()->index();
$table->string('wecom_key')->nullable()->comment('企业微信机器人 key');
$table->enum('status', ['up', 'down', 'maintenance'])->default('down')->index(); $table->enum('status', ['up', 'down', 'maintenance'])->default('down')->index();
$table->timestamps(); $table->timestamps();
$table->string('wecom_key')->nullable()->comment('企业微信机器人 key');
}); });
} }

View File

@ -11,13 +11,12 @@
* *
* @return void * @return void
*/ */
public function up(): void public function up()
{ {
Schema::create('notifications', function (Blueprint $table) { Schema::create('notifications', function (Blueprint $table) {
$table->uuid()->primary(); $table->uuid('id')->primary();
$table->string('type'); $table->string('type');
$table->string('notifiable_type')->index(); $table->morphs('notifiable');
$table->unsignedBigInteger('notifiable_id')->index();
$table->text('data'); $table->text('data');
$table->timestamp('read_at')->nullable(); $table->timestamp('read_at')->nullable();
$table->timestamps(); $table->timestamps();
@ -29,7 +28,7 @@ public function up(): void
* *
* @return void * @return void
*/ */
public function down(): void public function down()
{ {
Schema::dropIfExists('notifications'); Schema::dropIfExists('notifications');
} }