2021_02_02_141649_create_suppliers_table.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateSuppliersTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('suppliers', function (Blueprint $table) {
  15. $table->id();
  16. $table->string('name',30)->comment('名称');
  17. $table->string('contact_man',30)->comment('联系人');
  18. $table->string('phone')->comment('电话');
  19. $table->string('invoice_title')->comment('发票抬头');
  20. $table->string('bank',30)->comment('账户银行');
  21. $table->string('bank_account',50)->comment('收款账户');
  22. $table->string('opening_bank',50)->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('suppliers');
  35. }
  36. }