<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('schedule_shifts', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name', 100);
            $table->text('description')->nullable();
            $table->time('from_time');
            $table->time('to_time');
            $table->string('day_off', 100);
            $table->string('wfh', 100);
            // FOR CWS
            $table->time('cws_from_time');
            $table->time('cws_to_time');
            $table->string('cws_day', 100);

            $table->boolean('flexible')->default(false)->index();
            $table->boolean('enabled')->default(true)->index();
            $table->softDeletes();
            $table->timestamps();
        });
    }

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