2018_07_03_080411_create_orders_table.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateOrdersTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('orders', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->string('out_trade_no', 200)->nullable()->comment('订单号');
  17. $table->unsignedInteger('student_id')->nullable()->comment('学员ID');
  18. $table->string('phone', 200)->nullable()->comment('电话');
  19. $table->tinyInteger('pay_position')->nullable()->comment('付款落地页:1落地页1;2落地页2');
  20. $table->tinyInteger('pay_status')->nullable()->comment('付款状态:1未付款;2已付款;3已退款;4已取消;5回收站');
  21. $table->tinyInteger('pay_method')->nullable()->comment('付款方式:1微信支付');
  22. $table->string('money', 200)->nullable()->comment('订单金额:分');
  23. $table->string('remark', 200)->nullable()->comment('备注');
  24. $table->timestamps();
  25. });
  26. }
  27. /**
  28. * Reverse the migrations.
  29. *
  30. * @return void
  31. */
  32. public function down()
  33. {
  34. Schema::dropIfExists('orders');
  35. }
  36. }