2021_12_30_082824_create_user_show_table.php
1.28 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
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserShowTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_show', function (Blueprint $table) {
$table->increments('id');
$table->unsignedBigInteger('user_id')->comment('用户id');
$table->text('content')->comment('内容描述');
$table->unsignedTinyInteger('type')->comment('1=图文,2=视频');
$table->unsignedBigInteger('pick_id')->index()->comment('引用的秀id');
$table->integer('fav_num')->comment('收藏数');
$table->integer('view_num')->comment('观看数');
$table->integer('praise_num')->comment('点赞数');
$table->integer('comment_num')->comment('评论数');
$table->unsignedBigInteger('child_id')->comment('图文/视频表id');
$table->unsignedTinyInteger('state')->comment('状态');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_show');
}
}