<?php

namespace RadiusTheme\RadiusBooking\Models;

use RadiusTheme\RadiusBooking\Abstracts\BaseModel;
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}
/**
 * Class EmployeeDayoff
 *
 * @package RadiusTheme\RadiusBooking\Models
 *
 * @property int    $id
 * @property string $name
 */
class EmployeeDayoff extends BaseModel {

	/**
	 * The database table associated with the model.
	 *
	 * @var string
	 */
	protected string $table = 'radius_booking_employees_dayoff';

	/**
	 * The attributes that are mass assignable.
	 *
	 * @var array
	 */
	protected array $fillable = array(
		'name',
		'start_date',
		'end_date',
		'type',
		'recurring',
		'user_id',
	);

	/**
	 *  The attributes that should be cast to native types.
	 *
	 * @var array|string[]
	 */
	protected array $casts = array(
		'start_date' => 'datetime',
		'end_date'   => 'datetime',
		'recurring'  => 'boolean',
	);

	/**
	 * The validation rules.
	 *
	 * @var array
	 */
	protected array $rules = array(
		'name' => 'required|string|max:255',
	);
}
