12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreateNoticeTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('notices', function (Blueprint $table) {
- $table->bigIncrements('id');
- $table->string('title')->comment('公告标题');
- $table->text('content')->comment('公告内容');
- $table->string('url')->comment('公告链接');
- $table->integer('type')->comment('类型 1.用户端 2.医生端');
- $table->integer('status')->comment('状态 0.禁用 1.启用')->nullable(false)->unsigned();
- $table->dateTime('created_at')->comment('创建时间');
- $table->dateTime('updated_at')->comment('更新时间');
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('notices');
- }
- }
|