durong 5 rokov pred
rodič
commit
13d676ac2c

+ 36 - 0
database/migrations/2019_06_01_062519_create_behavior_operation_log_table.php

@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateBehaviorOperationLogTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('behavior_operation_log', function (Blueprint $table) {
+            $table->increments('id');
+            $table->integer('operator_id')->comment('操作人ID');
+            $table->integer('behavior_id')->comment('行为ID');
+            $table->string('username')->comment('用户名');
+            $table->tinyInteger('type')->nullable()->comment('操作类型:0.登记行为;1.编辑行为;2.开/关行为');
+            $table->string('content')->nullable()->comment('操作内容');
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::drop('behavior_operation_log');
+    }
+}

+ 49 - 0
database/migrations/2019_06_01_074135_create_behavior_table.php

@@ -0,0 +1,49 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateBehaviorTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('behavior', function (Blueprint $table) {
+            $table->increments('id');
+            $table->string('virus_behavior_id')->comment('virus对应行为ID');
+            $table->string('name')->comment('行为名称');
+            $table->tinyInteger('behavior_level')->default(0)->comment('行为级别:0.唯一/基础行为;1.多级行为');
+            $table->tinyInteger('behavior_cycle_type')->default(0)->comment('行为周期类型:0.普通/短期;1.长期');
+            $table->integer('behavior_action_id')->nullable()->comment('绑定的动作ID');
+            $table->string('behavior_cycle')->nullable()->comment('行为时间周期');
+            $table->integer('behavior_binding_users')->nullable()->comment('行为绑定用户:0.所有用户');
+            $table->string('physical_strength')->nullable()->comment('行为消耗体力值');
+            $table->string('rainbow_beans')->nullable()->comment('行为生成彩虹豆');
+            $table->string('remarks',100)->nullable()->comment('备注');
+            $table->tinyInteger('is_open')->comment('是否开启:0.关闭;1.开启');
+            $table->date('behavioral_cycle_start_time')->nullable()->comment('行为时间周期开始时间');
+            $table->date('behavioral_cycle_end_time')->nullable()->comment('行为时间周期结束时间');
+            $table->json('allotted_quantity_rule')->nullable()->comment('彩虹豆分配规则');
+            $table->string('behavior_identification')->nullable()->comment('行为标识');//英文的行为名称
+            $table->integer('trigger_times')->nullable()->comment('触发次数');
+            $table->integer('effective_trigger')->nullable()->comment('有效触发次数');
+            $table->integer('relative_series')->nullable()->comment('相对级数');
+            $table->integer('absolute_progression')->nullable()->comment('绝对级数');
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::drop('behavior');
+    }
+}

+ 41 - 0
database/migrations/2019_06_03_011812_create_registered_accounts_record_table.php

@@ -0,0 +1,41 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateRegisteredAccountsRecordTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('registered_accounts_record', function (Blueprint $table) {
+            $table->increments('id');
+            $table->string('virus_behavior_id')->comment('virus行为ID');
+            $table->integer('uid')->comment('用户ID');
+            $table->date('trigger_time')->comment('触发时间');
+            $table->string('physical_exertion')->nullable()->comment('消耗体力值');
+            $table->tinyInteger('trigger_type')->nullable()->comment('触发类型:0:无效触发;1.有效触发');
+            $table->tinyInteger('generation_type')->nullable()->comment('生成类型:1:彩虹豆');
+            $table->integer('absolute_progression')->nullable()->comment('绝对级数');
+            $table->integer('superior_uid')->nullable()->comment('上级用户ID');
+            $table->tinyInteger('release_status')->nullable()->comment('发放状态:0.异常;1.正常');
+            $table->integer('generation_quantity')->nullable()->comment('生成数量');
+            $table->integer('quantity_issued')->nullable()->comment('发放数量');
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::drop('registered_accounts_record');
+    }
+}

+ 42 - 0
database/migrations/2019_06_03_021228_create_comment_account_record_table.php

@@ -0,0 +1,42 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateCommentAccountRecordTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('comment_account_record', function (Blueprint $table) {
+            $table->increments('id');
+            $table->string('virus_behavior_id')->comment('virus行为ID');
+            $table->integer('uid')->comment('用户ID');
+            $table->date('upper_trigger_time')->comment('上级评论触发时间');
+            $table->integer('related_content_id')->comment('关联内容id');
+            $table->integer('content_author_id')->comment('内容作者id');
+            $table->integer('superior_commentator_id')->comment('上级评论者ID');
+            $table->string('physical_exertion')->nullable()->comment('消耗体力值');
+            $table->tinyInteger('trigger_type')->nullable()->comment('触发类型:0:无效触发;1.有效触发');
+            $table->tinyInteger('generation_type')->nullable()->comment('生成类型:1:彩虹豆');
+            $table->tinyInteger('release_status')->nullable()->comment('发放状态:0.异常;1.正常');
+            $table->integer('generation_quantity')->nullable()->comment('生成数量');
+            $table->integer('quantity_issued')->nullable()->comment('发放数量');
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::drop('comment_account_record');
+    }
+}

+ 41 - 0
database/migrations/2019_06_03_024134_create_general_ledger_record_table.php

@@ -0,0 +1,41 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateGeneralLedgerRecordTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('general_ledger_record', function (Blueprint $table) {
+            $table->increments('id');
+            $table->string('virus_behavior_id')->comment('virus行为ID');
+            $table->integer('uid')->comment('用户ID');
+            $table->date('trigger_time')->comment('触发时间');
+            $table->integer('related_content_id')->comment('关联内容id');
+            $table->integer('content_author_id')->comment('内容作者id');
+            $table->string('physical_exertion')->nullable()->comment('消耗体力值');
+            $table->tinyInteger('trigger_type')->nullable()->comment('触发类型:0:无效触发;1.有效触发');
+            $table->tinyInteger('generation_type')->nullable()->comment('生成类型:1:彩虹豆');
+            $table->tinyInteger('release_status')->nullable()->comment('发放状态:0.异常;1.正常');
+            $table->integer('generation_quantity')->nullable()->comment('生成数量');
+            $table->integer('quantity_issued')->nullable()->comment('发放数量');
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::drop('general_ledger_record');
+    }
+}

+ 40 - 0
database/migrations/2019_06_04_011501_create_release_record_table.php

@@ -0,0 +1,40 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreateReleaseRecordTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('release_record', function (Blueprint $table) {
+            $table->increments('id');
+            $table->string('virus_behavior_id')->comment('virus行为ID');
+            $table->integer('uid')->comment('用户ID');
+            $table->date('trigger_time')->comment('触发时间');
+            $table->integer('related_content_id')->comment('关联内容id');
+            $table->string('physical_exertion')->nullable()->comment('消耗体力值');
+            $table->tinyInteger('trigger_type')->nullable()->comment('触发类型:0:无效触发;1.有效触发');
+            $table->tinyInteger('generation_type')->nullable()->comment('生成类型:1:彩虹豆');
+            $table->tinyInteger('release_status')->nullable()->comment('发放状态:0.异常;1.正常');
+            $table->integer('generation_quantity')->nullable()->comment('生成数量');
+            $table->integer('quantity_issued')->nullable()->comment('发放数量');
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::drop('release_record');
+    }
+}