2018_10_16_144949_create_sms_batchs_table.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateSmsBatchsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('sms_batchs', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->string('name')->comment('批次标记');
  17. $table->text('mobiles')->comment('指定手机号码');
  18. $table->integer('sms_id')->comment('模板id');
  19. $table->tinyInteger('accept_member')->default('0')->comment('收件会员(0:不限 1:企业 2:个人)');
  20. $table->tinyInteger('accept_type')->default('0')->comment('验证类型(0:不限 1:邮箱已验证2:邮箱未验证 3:手机已验证 4:手机未验证)');
  21. $table->tinyInteger('accept_time')->default('0')->comment('登录时间(0:不限 1:一周未登录 2:一月未登录)');
  22. $table->integer('target_num')->default('0')->comment('目标发送数量');
  23. $table->integer('send_num')->default('0')->comment('实际发送数量');
  24. $table->tinyInteger('status')->default('0')->comment('状态:0发送中,1发送完成');
  25. $table->timestamps();
  26. $table->softDeletes();
  27. });
  28. }
  29. /**
  30. * Reverse the migrations.
  31. *
  32. * @return void
  33. */
  34. public function down()
  35. {
  36. Schema::dropIfExists('sms_batchs');
  37. }
  38. }