<?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('fat_log', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id')->comment('用户id')->index('user_id');
            $table->text('data')->comment('体脂处理后测量数据');
            $table->text('old_data')->comment('体脂处理前测量数据');
            $table->string('init_data')->nullable()->comment('初始化数据');
            $table->string('device_model')->nullable()->comment('体脂秤型号');
            $table->timestamps();
        });
    }

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