<?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('shops', function (Blueprint $table) {
            $table->id();
            $table->string('title')->comment("名称");
            $table->string('icon')->comment("图片");
            $table->enum('pay_type', ['wechat', 'free'])->comment("支付方式 free:免费，wechat:微信");
            $table->decimal('price',8)->default(0)->comment("价格");
            $table->decimal('vip_price')->default(0)->comment("会员价");
            $table->text('sku')->nullable()->comment("规格");
            $table->text("banners")->nullable()->comment("轮播图");
            $table->text("describe")->nullable()->comment("描述");
            $table->boolean("is_show")->default(0)->comment("0：下架，1：上架");
            $table->boolean('is_vip')->default(0)->comment('是否会员，0：否，1：是');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shops');
    }
};
