<?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('band_goals', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id')->unsigned()->comment("用户id");
            $table->integer('band_id')->unsigned()->comment('手环id');
            $table->integer('step_num')->default(0)->comment("步数 单位：步");
            $table->integer('distance')->default(0)->comment("距离 单位：千米");
            $table->integer('kcal')->default(0)->comment("卡路里 单位：卡");
            $table->integer('sleep')->default(0)->comment("睡眠 单位：分钟");
            $table->timestamps();
        });
    }

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