2018_10_09_031837_create_invoices_table.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateInvoicesTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('invoices', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->integer('oid')->comment('订单ID');
  17. $table->string('order_num')->comment('订单编号');
  18. $table->integer('uid')->comment('会员ID');
  19. $table->tinyInteger('title')->comment('订单标题1:企业;2:个人');
  20. $table->tinyInteger('cid')->comment('类型编号(1=>资询费,2=>资询服务费,3=>服务费)');
  21. $table->string('organization')->comment('组织/单位名称');
  22. $table->string('deposit_bank')->comment('开户行');
  23. $table->string('account')->comment('账号');
  24. $table->string('addressee')->comment('收件人');
  25. $table->bigInteger('mobile')->comment('手机号');
  26. $table->string('address')->comment('地址');
  27. $table->mediumInteger('postcode')->comment('邮编');
  28. $table->tinyInteger('audit')->comment('审核(0:未开票 1:已开票 2:取消)');
  29. $table->text('reason')->comment('取消原因');
  30. $table->timestamps();
  31. });
  32. }
  33. /**
  34. * Reverse the migrations.
  35. *
  36. * @return void
  37. */
  38. public function down()
  39. {
  40. Schema::dropIfExists('invoices');
  41. }
  42. }