123456789101112131415161718192021222324252627282930313233343536373839 |
- <?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('agent_project', function (Blueprint $table) {
- $table->comment('代理商服务项目');
- $table->increments('id');
- $table->unsignedBigInteger('cate_id')->comment('代理商项目分类ID');
- $table->unsignedBigInteger('project_id')->comment('项目ID');
- $table->decimal('price')->default(new \Illuminate\Database\Query\Expression('0.00'))->comment('项目金额');
- $table->integer('duration')->default(new \Illuminate\Database\Query\Expression('0'))->comment('服务时长(分钟)');
- $table->integer('distance')->default(new \Illuminate\Database\Query\Expression('0'))->comment('接单距离(米)');
- $table->string('state')->default('enable')->comment('状态(enable:启用 disable:禁用)');
- $table->timestamps();
- $table->softDeletes();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('agent_project');
- }
- };
|