<?php

namespace App\Http\Controllers\Owner\OfficesBriefing\Dto;

use App\Modules\DefinedService\OfficesBriefing\Domain\BriefingOfficeStatus;

class OfficesBriefingUpdateDTO
{
    public static function validateData()
    {
        return [
            'Id_BriefingOffice'       => 'required|int',
            'BriefingOffice_Name'     => 'required|string|max:100',
            'BriefingOffice_Status'   => 'nullable|in:' . implode(',', BriefingOfficeStatus::validValues()),
            'BriefingOffice_Color'    => 'nullable|string|regex:/^#[0-9A-Fa-f]{6}$/',
            'BriefingOffice_Capacity' => 'nullable|int|min:0',
            'Parent_Office_Id'        => 'nullable|int|min:1',
            'Id_Location'             => 'required|int|min:1',
        ];
    }

    public function __construct(
        public int $Id_BriefingOffice,
        public ?string $BriefingOffice_Name,
        public ?int $BriefingOffice_Status,
        public ?string $BriefingOffice_Color,
        public ?int $BriefingOffice_Capacity,
        public ?int $Parent_Office_Id,
        public ?int $Id_Location,
    ) {}
}
