2022_01_24_163547_create_immerse_table.php
1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateImmerseTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('immerse', function (Blueprint $table) {
$table->increments('id');
$table->unsignedBigInteger('user_id')->index()->comment('用户id');
$table->string('title')->default('')->comment('标题');
$table->text('content')->comment('内容');
$table->string('url')->comment('最终合成视频地址');
$table->unsignedTinyInteger('type')->comment('音频图文=1,视频=2');
$table->double('duration')->comment('时长');
$table->unsignedInteger('size')->comment('大小');
$table->integer('praise')->default(0)->comment('点赞量');
$table->integer('view')->default(0)->comment('播放量');
$table->integer('collect')->default(0)->comment('收藏量');
$table->integer('share')->default(0)->comment('分享量');
$table->integer('comment')->default(0)->comment('评论数');
$table->unsignedTinyInteger('state')->index()->default(1)->comment('0=正在合成,1=已完成,2=合成失败');
$table->unsignedTinyInteger('is_publish')->index()->default(1)->comment('草稿=0,发布=1');
$table->unsignedTinyInteger('is_check')->index()->default(0)->comment('审核通过=1,未通过=0');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('immerse');
}
}