2019_06_01_074135_create_behavior_table.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. class CreateBehaviorTable extends Migration
  5. {
  6. /**
  7. * Run the migrations.
  8. *
  9. * @return void
  10. */
  11. public function up()
  12. {
  13. Schema::create('behavior', function (Blueprint $table) {
  14. $table->increments('id');
  15. $table->string('virus_behavior_id')->comment('virus对应行为ID');
  16. $table->string('name')->comment('行为名称');
  17. $table->tinyInteger('behavior_level')->default(0)->comment('行为级别:0.唯一/基础行为;1.多级行为');
  18. $table->tinyInteger('behavior_cycle_type')->default(0)->comment('行为周期类型:0.普通/短期;1.长期');
  19. $table->integer('behavior_action_id')->nullable()->comment('绑定的动作ID');
  20. $table->string('behavior_cycle')->nullable()->comment('行为时间周期');
  21. $table->integer('behavior_binding_users')->nullable()->comment('行为绑定用户:0.所有用户');
  22. $table->string('physical_strength')->nullable()->comment('行为消耗体力值');
  23. $table->string('rainbow_beans')->nullable()->comment('行为生成U米');
  24. $table->string('remarks',100)->nullable()->comment('备注');
  25. $table->tinyInteger('is_open')->comment('是否开启:0.关闭;1.开启');
  26. $table->date('behavioral_cycle_start_time')->nullable()->comment('行为时间周期开始时间');
  27. $table->date('behavioral_cycle_end_time')->nullable()->comment('行为时间周期结束时间');
  28. $table->json('allotted_quantity_rule')->nullable()->comment('U米分配规则');
  29. $table->string('behavior_identification')->nullable()->comment('行为标识');//英文的行为名称
  30. $table->integer('trigger_times')->nullable()->comment('触发次数');
  31. $table->integer('effective_trigger')->nullable()->comment('有效触发次数');
  32. $table->integer('relative_series')->nullable()->comment('相对级数');
  33. $table->integer('absolute_progression')->nullable()->comment('绝对级数');
  34. $table->timestamps();
  35. });
  36. }
  37. /**
  38. * Reverse the migrations.
  39. *
  40. * @return void
  41. */
  42. public function down()
  43. {
  44. Schema::drop('behavior');
  45. }
  46. }