2019_04_16_164122_create_company_contacts_table.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateCompanyContactsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('company_contacts', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->integer('company_id')->index()->comment('企业ID');
  17. $table->string('contact')->comment('联系人');
  18. $table->bigInteger('telephone')->comment('手机号')->nullable();
  19. $table->string('landline_tel')->comment('固话');
  20. $table->string('email')->comment('邮箱');
  21. $table->string('qq')->comment('QQ')->nullable();
  22. $table->string('address')->comment('联系地址');
  23. $table->timestamps();
  24. $table->softDeletes();
  25. });
  26. }
  27. /**
  28. * Reverse the migrations.
  29. *
  30. * @return void
  31. */
  32. public function down()
  33. {
  34. Schema::dropIfExists('company_contacts');
  35. }
  36. }