2018_10_10_093326_create_tpls_table.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateTplsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('tpls', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->tinyInteger('tpl_type')->index()->default('1')->comment('模板类型(1:企业 2:个人)');
  17. $table->string('name')->comment('模板名称');
  18. $table->tinyInteger('display')->comment('是否显示(1:显示 0:不显示)');
  19. $table->tinyInteger('default')->comment('是否默认模板(1:是 0:不是)');
  20. $table->integer('price')->comment('价格(积分)');
  21. $table->string('dir')->comment('路径')->nullable();
  22. $table->string('images')->comment('图片')->nullable();
  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('tpls');
  35. }
  36. }