2018_09_04_073430_creat_table_order.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreatTableOrder extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('order', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->softDeletes();
  17. $table->string('mobile',20)->comment('客户电话号');
  18. $table->string('name',20)->comment('受检者姓名');
  19. $table->string('nationality',10)->comment('民族');
  20. $table->string('sex')->comment('性别');
  21. $table->string('email')->comment('电子邮件地址');
  22. $table->string('native_place')->comment('籍贯');
  23. $table->string('work')->comment('职业');
  24. $table->string('address')->comment('通讯地址');
  25. $table->string('sample_type')->comment('样本类型');
  26. $table->longText('single')->comment('单项');
  27. $table->longText('combo')->comment('套餐');
  28. $table->decimal('total_price')->comment('总价');
  29. $table->string('code')->comment('条形码');
  30. $table->longText('comment')->comment('备注');
  31. $table->timestamps();
  32. });
  33. }
  34. /**
  35. * Reverse the migrations.
  36. *
  37. * @return void
  38. */
  39. public function down()
  40. {
  41. Schema::dropIfExists('order');
  42. }
  43. }