<?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('shop_services', function (Blueprint $table) {
            $table->comment('店铺服务');
            $table->increments('id');
            $table->unsignedBigInteger('shop_id')->comment('店铺编号');
            $table->unsignedBigInteger('service_id')->comment('服务项目编号');
            $table->string('name')->default('')->comment('服务项目名称');
            $table->string('cover')->nullable()->comment('服务项目封面');
            $table->decimal('price')->comment('服务项目价格');
            $table->integer('duration')->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('shop_services');
    }
};
