master
cody 4 months ago
parent 8705f94d82
commit 51ede2245f

@ -0,0 +1,39 @@
<?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('email_templates', function (Blueprint $table) {
$table->id();
// 标题
$table->string('title')->nullable()->comment('标题');
// 描述
$table->string('description')->nullable()->comment('描述');
// 内容
$table->mediumText('content')->nullable()->comment('内容');
// 可用变量
$table->string('var')->nullable()->comment('可用变量');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('email_templates');
}
};

@ -0,0 +1,37 @@
<?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('email_records', function (Blueprint $table) {
$table->id();
// 发送时间
$table->dateTime('time')->nullable()->comment('发送时间');
// 邮件主题
$table->string('subject')->nullable()->comment('邮件主题');
// 邮件模版id
$table->integer('email_template_id')->nullable()->comment('邮件模版id');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('email_records');
}
};

@ -0,0 +1,39 @@
<?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('email_record_users', function (Blueprint $table) {
$table->id();
// 发送配置id
$table->integer('email_record_id')->nullable()->comment('发送记录id');
// 接收用户id
$table->integer('user_id')->nullable()->comment('接收用户id');
// 状态
$table->tinyInteger('status')->nullable()->comment('状态0:待发送1:成功 2:失败');
// 发送时间
$table->dateTime('send_time')->nullable()->comment('发送时间');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('email_records');
}
};
Loading…
Cancel
Save