<?php

namespace Database\Seeders;

use App\Models\Package;
use App\Models\Tenant;
use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    public function run(): void
    {
        $enterprise = Package::create([
            'name' => 'Enterprise',
            'code' => 'enterprise',
            'description' => 'Full workforce suite with payroll, attendance, devices, reports, and APIs.',
            'monthly_price' => 499,
            'yearly_price' => 4990,
            'employee_limit' => 10000,
            'branch_limit' => 500,
            'device_limit' => 1000,
            'trial_days' => 14,
            'features' => ['payroll', 'attendance', 'leave', 'loan', 'advance_salary', 'task_management', 'contract_management', 'finance', 'api_access', 'face_recognition', 'gps_attendance', 'holiday_ot', 'multi_branch', 'shift_management'],
            'is_active' => true,
        ]);

        Tenant::create([
            'package_id' => $enterprise->id,
            'name' => 'Demo Manufacturing Ltd',
            'slug' => 'demo-manufacturing',
            'email' => 'admin@example.com',
            'status' => 'active',
            'timezone' => 'Asia/Dhaka',
            'currency' => 'BDT',
            'employee_limit' => 10000,
            'branch_limit' => 500,
            'device_limit' => 1000,
            'expires_at' => now()->addYear(),
        ]);
    }
}
