2018_07_11_024344_create_messages_info_table.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateMessagesInfoTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('messages_info', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->integer('site_id')->nullable()->comment('站点ID');
  17. $table->string('title',255)->comment('标题');
  18. $table->text('content')->comment('内容');
  19. $table->integer('user_id')->comment('发布人');
  20. $table->double('price')->nullable()->comment('金额');
  21. $table->string('phone',11)->nullable()->commet('联系方式');
  22. $table->text('comment')->nullable()->comment('付费信息');
  23. $table->tinyInteger('type')->comment('类型:0:免费;1:付费;2:收费');
  24. $table->integer('sort')->nullable()->comment('排序:越大越靠前');
  25. $table->softDeletes();
  26. $table->timestamps();
  27. });
  28. }
  29. /**
  30. * Reverse the migrations.
  31. *
  32. * @return void
  33. */
  34. public function down()
  35. {
  36. Schema::dropIfExists('messages_info');
  37. }
  38. }