<?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('health_kinds', function (Blueprint $table) {
            $table->id();
            $table->enum('name', ["体重", "基础代谢", '体脂率', 'BMI', '体年龄', '体型', '骨量', '心脏指数', '心率', '去脂体重', '骨骼肌率', '肌肉量', '蛋白质', '皮下脂肪', '内脏脂肪', '体水分', '健康评分', '体重控制','脂肪控制', '肌肉控制','脂肪重量']);
            $table->enum('e_name', ['Weight', "BMR", 'Bodyfat', 'BMI', 'BodyAge', 'BodyShape', 'Bone', 'HeartIndex', 'HeartRate', 'LBM', 'Muscle', 'Sinew', 'Protein', 'Subfat', 'Visfat', 'Water', 'Score', 'WeightControl', 'FatControl', 'SinewControl', 'BodyfatMass']);
            $table->string('icon')->comment("默认");
            $table->string('h_icon')->comment("高亮");
            $table->enum('unit', ["kg", 'kcal', '%', '岁', 'L/min/m^2', 'bpm','']);
            $table->timestamps();
            $table->timestamp('deleted_at')->nullable();
        });
    }

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