<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Models\PriceModifier;
use App\Models\Room;
use App\Models\RoomCategory;

class PriceModifierSeeder extends Seeder
{
    //
    public function run(): void
    {

        /*
        Modifier 1
        Weekend surcharge +10%
        */
        $m1 = PriceModifier::create([
            'name' => 'Weekend Surcharge',
            'calculation' => 'percent',
            'operation' => 'add',
            'value' => 10,
            'type' => 'weekend',
            'custom_days' => [5, 6],
            'priority' => 1
        ]);

        /*
        Modifier 2
        Weekday discount -5%
        */
        $m2 = PriceModifier::create([
            'name' => 'Weekday Discount',
            'calculation' => 'percent',
            'operation' => 'subtract',
            'value' => 5,
            'type' => 'weekday',
            'custom_days' => [0, 1, 2, 3, 4],
            'priority' => 2
        ]);

        /*
        Modifier 3
        Cleaning fee +500 flat (all days)
        */
        $m3 = PriceModifier::create([
            'name' => 'Cleaning Fee',
            'calculation' => 'flat',
            'operation' => 'add',
            'value' => 500,
            'type' => 'all',
            'custom_days' => [0, 1, 2, 3, 4, 5, 6],
            'priority' => 3
        ]);

        /*
        Modifier 4
        Midweek promo (Tue, Wed, Thu) -1000
        */
        $m4 = PriceModifier::create([
            'name' => 'Midweek Promotion',
            'calculation' => 'flat',
            'operation' => 'subtract',
            'value' => 1000,
            'type' => 'custom',
            'custom_days' => [2, 3, 4],
            'priority' => 4
        ]);

        /*
        Modifier 5
        Deluxe category surcharge +15%
        */
        $m5 = PriceModifier::create([
            'name' => 'Premium Category Surcharge',
            'calculation' => 'percent',
            'operation' => 'add',
            'value' => 15,
            'type' => 'all',
            'custom_days' => [0, 1, 2, 3, 4, 5, 6],
            'priority' => 5
        ]);
    }
}
