2017_12_29_140101_create_ss_node_table.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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->charset = 'utf8mb4';
  17. $table->collation = 'utf8mb4_unicode_ci';
  18. $table->increments('id');
  19. $table->string('name', 128)->default('')->comment('名称');
  20. $table->integer('group_id')->default('0')->comment('所属分组');
  21. $table->char('country_code', 5)->default('')->nullable()->comment('国家代码');
  22. $table->string('server', 128)->default('')->nullable()->comment('服务器域名地址');
  23. $table->string('ip', 15)->default('')->nullable()->comment('服务器IPV4地址');
  24. $table->string('ipv6', 128)->default('')->nullable()->comment('服务器IPV6地址');
  25. $table->string('desc', 255)->default('')->nullable()->comment('节点简单描述');
  26. $table->string('method', 32)->default('aes-192-ctr')->comment('加密方式');
  27. $table->string('protocol', 128)->default('auth_chain_a')->comment('协议');
  28. $table->string('protocol_param', 128)->default('')->nullable()->comment('协议参数');
  29. $table->string('obfs', 128)->default('tls1.2_ticket_auth')->comment('混淆');
  30. $table->string('obfs_param', 128)->default('')->nullable()->comment('混淆参数');
  31. $table->float('traffic_rate')->default('1.00')->comment('流量比率');
  32. $table->integer('bandwidth')->default('100')->comment('出口带宽,单位M');
  33. $table->bigInteger('traffic')->default('1000')->comment('每月可用流量,单位G');
  34. $table->string('monitor_url', 255)->default('')->nullable()->comment('监控地址');
  35. $table->tinyInteger('is_subscribe')->default('1')->nullable()->comment('是否允许用户订阅该节点:0-否、1-是');
  36. $table->tinyInteger('compatible')->default('0')->nullable()->comment('兼容SS');
  37. $table->tinyInteger('single')->default('0')->nullable()->comment('单端口多用户');
  38. $table->tinyInteger('single_force')->default('0')->nullable()->comment('模式:0-兼容模式、1-严格模式');
  39. $table->string('single_port', 50)->default('')->nullable()->comment('端口号,用,号分隔');
  40. $table->string('single_passwd', 50)->default('')->nullable()->comment('密码');
  41. $table->string('single_method', 50)->default('')->nullable()->comment('加密方式');
  42. $table->string('single_protocol', 50)->default('')->nullable()->comment('协议');
  43. $table->string('single_obfs', 50)->default('')->nullable()->comment('混淆');
  44. $table->integer('sort')->default('0')->comment('排序值,值越大越靠前显示');
  45. $table->tinyInteger('status')->default('1')->comment('状态:0-维护、1-正常');
  46. $table->dateTime('created_at')->nullable();
  47. $table->dateTime('updated_at')->nullable();
  48. });
  49. }
  50. /**
  51. * Reverse the migrations.
  52. *
  53. * @return void
  54. */
  55. public function down()
  56. {
  57. Schema::dropIfExists('ss_node');
  58. }
  59. }