2018_07_10_151246_create_dealers_table.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateDealersTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('dealers', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->string('name')->comment('名称');
  17. $table->string('identifier')->unique()->comment('编号');
  18. $table->text('description')->nullable()->comment('简称');
  19. $table->string('province')->nullable()->comment('省份');
  20. $table->string('city')->nullable()->comment('市');
  21. $table->string('mobile')->nullable()->comment('手机号');
  22. $table->string('phone')->nullable()->comment('电话');
  23. $table->string('fax')->nullable()->comment('传真');
  24. $table->string('email')->nullable()->comment('邮箱');
  25. $table->text('address')->nullable()->comment('地址');
  26. $table->string('website')->nullable()->comment('网址');
  27. $table->text('remark')->nullable()->comment('备注');
  28. $table->tinyInteger('status')->default(1)->comment('状态');
  29. $table->timestamps();
  30. });
  31. }
  32. /**
  33. * Reverse the migrations.
  34. *
  35. * @return void
  36. */
  37. public function down()
  38. {
  39. Schema::dropIfExists('dealers');
  40. }
  41. }