<?php

namespace App\Http\Controllers\Client\Booking\Dto;

class BookingInsertDTO
{
    public static function validateData()
    {
        return [
            'Id_User'           => 'int',
            'User_Name'         => 'required|string|max:100',
            'User_LastName'     => 'required|string|max:100',
            'User_Email'        => 'required|string|max:250',
            'User_Phone'        => 'string|max:20',
            'Id_UserCountry'    => 'required|int',

            'Booking'           => 'required|string',
            'CashMovement'      => 'required|string'
        ];
    }

    public $Booking;
    public $CashMovement;

    public function __construct(
        public string $Id_User,
        public string $User_Name,
        public string $User_LastName,
        public string $User_Email,
        public string $User_Phone,
        public string $Id_UserCountry,

        string $Booking,
        string $CashMovement
    ) {
        $this->Booking = json_decode($Booking);
        $this->CashMovement = (array)json_decode($CashMovement);
    }
}
