12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateTablePostData extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('post_data', function (Blueprint $table) {
- $table->bigIncrements('id');
- $table->integer('post_id')
- ->index('post_id')
- ->comment('帖子id');
- $table->integer('pv')
- ->default(0)
- ->comment('pv');
- $table->integer('pv_real')
- ->default(0)
- ->comment('实际pv');
- $table->integer('dislike_count')
- ->default(0)
- ->comment('不喜欢数');
- $table->integer('praise_count')
- ->default(0)
- ->comment('点赞数');
- $table->integer('praise_real_count')
- ->default(0)
- ->comment('实际点赞数');
- $table->integer('share_count')
- ->default(0)
- ->comment('分享数');
- $table->integer('share_real_count')
- ->default(0)
- ->comment('实际分享数');
- $table->integer('comment_count')
- ->default(0)
- ->comment('评论数');
- $table->integer('comment_real_count')
- ->default(0)
- ->comment('实际评论数');
- $table->integer('collect_count')
- ->default(0)
- ->comment('收藏数');
- $table->integer('collect_real_count')
- ->default(0)
- ->comment('实际收藏数');
- $table->integer('available_bean')
- ->default(0)
- ->comment('预计可获得U米数');
- $table->integer('will_collect_bean')
- ->default(0)
- ->comment('待收获U米数');
- $table->integer('collect_bean')
- ->default(0)
- ->comment('领取U米');
- $table->decimal('weight', 8, 2)
- ->default(0)
- ->comment('权重');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('post_data');
- }
- }
|