123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- return new class extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('project', function (Blueprint $table) {
- $table->comment('项目服务');
- $table->increments('id');
- $table->unsignedBigInteger('cate_id')->comment('项目分类编号');
- $table->string('cover')->nullable()->comment('项目封面');
- $table->string('title')->default('')->comment('项目标题');
- $table->string('subtitle')->nullable()->comment('项目副标题');
- $table->decimal('price')->comment('项目金额');
- $table->decimal('original_price')->comment('项目原价');
- $table->integer('sales')->default(new \Illuminate\Database\Query\Expression('0'))->nullable()->comment('虚拟销量');
- $table->integer('duration')->comment('服务时长');
- $table->text('project_desc')->nullable()->comment('项目介绍');
- $table->text('service_desc')->nullable()->comment('服务说明');
- $table->string('type')->default('')->comment('服务类型');
- $table->string('state')->default('ENABLE')->comment('状态');
- $table->timestamps();
- $table->softDeletes();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('project');
- }
- };
|