Medical Appointments API

ScheduleTimeSlotDomain
in package
implements JsonSerializable

Tags
OA\Schema

( schema="ScheduleTimeSlot", title="ScheduleTimeSlot", description="ScheduleTimeSlot model", required={"day", "startTime", "endTime", "createdAt", "active"}, @OA\Property ( property="id", type="integer", format="int64", description="Unique identifier of the schedule time slot", example=1 ), @OA\Property ( property="scheduleId", type="integer", format="int64", description="Unique identifier of the schedule", example=1 ), @OA\Property ( property="day", type="integer", format="int32", description="Day of the week. Sunday is 0, Monday is 1, and so on.", example=1 ), @OA\Property ( property="startTime", type="string", description="Start time of the time slot in the format HH:mm", example="08:00" ), @OA\Property ( property="endTime", type="string", description="End time of the time slot in the format HH:mm", example="09:00" ), @OA\Property ( property="createdAt", type="integer", format="int64", description="Creation date and time of the schedule time slot in Unix timestamp", example=1616598000 ), @OA\Property ( property="active", type="boolean", description="Indicates whether the schedule time slot is active or not", example=true ) )

Interfaces, Classes, Traits and Enums

JsonSerializable

Table of Contents

$active  : bool|null
$createdAt  : DateTime|null
$day  : int|null
$endTime  : string|null
$id  : int|null
$scheduleId  : int|null
$startTime  : string|null
fromArray()  : ScheduleTimeSlotDomain
Creates an ScheduleTimeSlotDomain object from an array.
getActive()  : bool|null
Get whether the time slot is active.
getCreatedAt()  : DateTime|null
Get the creation date and time.
getDay()  : int|null
Get the day of the week (1-7, where 1 is Monday and 7 is Sunday).
getEndTime()  : string|null
Get the end time of the time slot (in the format "H:i:s").
getId()  : int|null
Get the time slot ID.
getScheduleId()  : int|null
Get the schedule ID.
getStartTime()  : string|null
Get the start time of the time slot (in the format "H:i:s").
jsonSerialize()  : array<string|int, mixed>
Returns an array representation of the ScheduleTimeSlotDomain object.
setActive()  : void
Set whether the time slot is active.
setCreatedAt()  : void
Set the creation date and time.
setDay()  : void
Set the day of the week (1-7, where 1 is Monday and 7 is Sunday).
setEndTime()  : void
Set the end time of the time slot (in the format "H:i:s").
setId()  : void
Set the time slot ID.
setScheduleId()  : void
Set the schedule ID.
setStartTime()  : void
Set the start time of the time slot (in the format "H:i:s").

Properties

$endTime

private string|null $endTime = null

The end time of the time slot (in the format "H:i:s").

$startTime

private string|null $startTime = null

The start time of the time slot (in the format "H:i:s").

Methods

fromArray()

Creates an ScheduleTimeSlotDomain object from an array.

public static fromArray(array<string|int, mixed> $data) : ScheduleTimeSlotDomain
Parameters
$data : array<string|int, mixed>

The array to create the object from.

Tags
throws
Exception

If there is an error creating the object.

Return values
ScheduleTimeSlotDomain

The created ScheduleTimeSlotDomain object.

getActive()

Get whether the time slot is active.

public getActive() : bool|null
Return values
bool|null

Whether the time slot is active.

getCreatedAt()

Get the creation date and time.

public getCreatedAt() : DateTime|null
Return values
DateTime|null

The creation date and time.

getDay()

Get the day of the week (1-7, where 1 is Monday and 7 is Sunday).

public getDay() : int|null
Return values
int|null

The day of the week.

getEndTime()

Get the end time of the time slot (in the format "H:i:s").

public getEndTime() : string|null
Return values
string|null

The end time of the time slot.

getId()

Get the time slot ID.

public getId() : int|null
Return values
int|null

The time slot ID.

getScheduleId()

Get the schedule ID.

public getScheduleId() : int|null
Return values
int|null

The schedule ID.

getStartTime()

Get the start time of the time slot (in the format "H:i:s").

public getStartTime() : string|null
Return values
string|null

The start time of the time slot.

jsonSerialize()

Returns an array representation of the ScheduleTimeSlotDomain object.

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

The array representation of the ScheduleTimeSlotDomain object.

setActive()

Set whether the time slot is active.

public setActive(bool|null $active) : void
Parameters
$active : bool|null

Whether the time slot is active.

Return values
void

setCreatedAt()

Set the creation date and time.

public setCreatedAt(DateTime|null $createdAt) : void
Parameters
$createdAt : DateTime|null

The creation date and time.

Return values
void

setDay()

Set the day of the week (1-7, where 1 is Monday and 7 is Sunday).

public setDay(int|null $day) : void
Parameters
$day : int|null

The day of the week.

Return values
void

setEndTime()

Set the end time of the time slot (in the format "H:i:s").

public setEndTime(string|null $endTime) : void
Parameters
$endTime : string|null

The end time of the time slot.

Return values
void

setId()

Set the time slot ID.

public setId(int|null $id) : void
Parameters
$id : int|null

The time slot ID.

Return values
void

setScheduleId()

Set the schedule ID.

public setScheduleId(int|null $scheduleId) : void
Parameters
$scheduleId : int|null

The schedule ID.

Return values
void

setStartTime()

Set the start time of the time slot (in the format "H:i:s").

public setStartTime(string|null $startTime) : void
Parameters
$startTime : string|null

The start time of the time slot.

Return values
void

Search results