2017_12_29_140101_create_ss_node_table.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateSsNodeTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('ss_node', function (Blueprint $table) {
  15. $table->engine = 'InnoDB';
  16. $table->increments('id');
  17. $table->string('name', 128)->comment('名称');
  18. $table->integer('group_id')->default('0')->comment('所属分组');
  19. $table->char('country_code', 5)->comment('国家代码');
  20. $table->string('server', 128)->comment('服务器地址');
  21. $table->string('desc', 255)->comment('节点简单描述');
  22. $table->string('method', 30)->default('aes-192-ctr')->comment('加密方式');
  23. $table->string('custom_method', 30)->default('aes-192-ctr')->comment('自定义加密方式');
  24. $table->string('protocol', 128)->default('auth_chain_a')->comment('协议');
  25. $table->string('protocol_param', 128)->comment('协议参数');
  26. $table->string('obfs', 128)->default('tls1.2_ticket_auth')->comment('混淆');
  27. $table->string('obfs_param', 128)->comment('混淆参数');
  28. $table->float('traffic_rate')->default('1')->comment('流量比率');
  29. $table->integer('bandwidth')->default('100')->comment('出口带宽,单位M');
  30. $table->bigInteger('traffic')->default('1000')->comment('每月可用流量,单位G');
  31. $table->string('monitor_url', 255)->comment('监控地址');
  32. $table->tinyInteger('compatible')->default('0')->comment('兼容SS');
  33. $table->tinyInteger('single')->default('0')->comment('单端口多用户');
  34. $table->tinyInteger('single_force')->comment('模式:0-兼容模式、1-严格模式');
  35. $table->string('single_port', 50)->comment('端口号,用,号分隔');
  36. $table->string('single_passwd', 50)->comment('密码');
  37. $table->string('single_method', 128)->comment('加密方式');
  38. $table->string('single_protocol', 128)->comment('协议');
  39. $table->string('single_obfs', 128)->comment('混淆');
  40. $table->integer('sort')->default('0')->comment('排序值,值越大越靠前显示');
  41. $table->tinyInteger('status')->default('1')->comment('状态:0-维护、1-正常');
  42. $table->dateTime('created_at')->nullable();
  43. $table->dateTime('updated_at')->nullable();
  44. });
  45. }
  46. /**
  47. * Reverse the migrations.
  48. *
  49. * @return void
  50. */
  51. public function down()
  52. {
  53. Schema::dropIfExists('ss_node');
  54. }
  55. }