Medical Appointments API

AppointmentDomain
in package
implements JsonSerializable

Represents an appointment domain.

Tags
OA\Schema

( schema="Appointment", title="Appointment", description="Appointment model", required={"dni", "fullName", "email", "phoneNumber", "scheduleTimeSlotId", "appointmentStart", "appointmentEnd", "statusId"}, @OA\Property ( property="dni", type="integer", format="int64", description="DNI", example=12345678 ), @OA\Property ( property="fullName", type="string", description="Full name", example="John Doe" ), @OA\Property ( property="email", type="string", description="Email", example="test@yopmail.com" ), @OA\Property ( property="phoneNumber", type="string", description="Phone number", example="123456789" ), @OA\Property ( property="scheduleTimeSlotId", type="integer", format="int64", description="Schedule time slot id", example=1 ), @OA\Property ( property="appointmentStart", type="integer", format="int64", description="Appointment start time in Unix timestamp", example=1616598000 ), @OA\Property ( property="appointmentEnd", type="integer", format="int64", description="Appointment end time in Unix timestamp", example=1616598000 ), @OA\Property ( property="statusId", type="integer", format="int64", description="Status id", example=1 ), @OA\Property ( property="createdAt", type="integer", format="int64", description="Creation time in Unix timestamp", example=1616598000 ) )

Interfaces, Classes, Traits and Enums

JsonSerializable

Table of Contents

$appointment_end  : DateTime|null
$appointment_start  : DateTime|null
$created_at  : DateTime|null
$dni  : int|null
$email  : string|null
$full_name  : string|null
$id  : int|null
$phone_number  : string|null
$schedule_time_slot_id  : int|null
$status_id  : int|null
fromArray()  : AppointmentDomain
Creates an appointment domain from an array of data.
getAppointmentEnd()  : DateTime|null
Gets the end time of the appointment.
getAppointmentStart()  : DateTime|null
Gets the start time of the appointment.
getCreatedAt()  : DateTime|null
Gets the creation date of the appointment.
getDni()  : int|null
Gets the DNI of the appointment.
getEmail()  : string|null
Gets the email of the appointment.
getFullName()  : string|null
Gets the full name of the appointment.
getId()  : int|null
Gets the ID of the appointment.
getPhoneNumber()  : string|null
Gets the phone number of the appointment.
getScheduleTimeSlotId()  : int|null
Gets the ID of the schedule time slot for the appointment.
getStatusId()  : int|null
Gets the ID of the status for the appointment.
jsonSerialize()  : array<string|int, mixed>
Serializes the appointment domain to JSON.
setAppointmentEnd()  : void
Sets the end time of the appointment.
setAppointmentStart()  : void
Sets the start time of the appointment.
setCreatedAt()  : void
Sets the creation date of the appointment.
setDni()  : void
Sets the DNI of the appointment.
setEmail()  : void
Sets the email of the appointment.
setFullName()  : void
Sets the full name of the appointment.
setId()  : void
Sets the ID of the appointment.
setPhoneNumber()  : void
Sets the phone number of the appointment.
setScheduleTimeSlotId()  : void
Sets the ID of the schedule time slot for the appointment.
setStatusId()  : void
Sets the ID of the status for the appointment.

Properties

$appointment_end

private DateTime|null $appointment_end = null

The end time of the appointment.

$appointment_start

private DateTime|null $appointment_start = null

The start time of the appointment.

$created_at

private DateTime|null $created_at = null

The creation date of the appointment.

$full_name

private string|null $full_name = null

The full name of the appointment.

$phone_number

private string|null $phone_number = null

The phone number of the appointment.

$schedule_time_slot_id

private int|null $schedule_time_slot_id = null

The ID of the schedule time slot for the appointment.

$status_id

private int|null $status_id = null

The ID of the status for the appointment.

Methods

fromArray()

Creates an appointment domain from an array of data.

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

The data to create the appointment domain from.

Tags
throws
Exception

If there is an error creating the appointment domain.

Return values
AppointmentDomain

The created appointment domain.

getAppointmentEnd()

Gets the end time of the appointment.

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

The end time of the appointment.

getAppointmentStart()

Gets the start time of the appointment.

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

The start time of the appointment.

getCreatedAt()

Gets the creation date of the appointment.

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

The creation date of the appointment.

getDni()

Gets the DNI of the appointment.

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

The DNI of the appointment.

getEmail()

Gets the email of the appointment.

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

The email of the appointment.

getFullName()

Gets the full name of the appointment.

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

The full name of the appointment.

getId()

Gets the ID of the appointment.

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

The ID of the appointment.

getPhoneNumber()

Gets the phone number of the appointment.

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

The phone number of the appointment.

getScheduleTimeSlotId()

Gets the ID of the schedule time slot for the appointment.

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

The ID of the schedule time slot for the appointment.

getStatusId()

Gets the ID of the status for the appointment.

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

The ID of the status for the appointment.

jsonSerialize()

Serializes the appointment domain to JSON.

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

The serialized appointment domain.

setAppointmentEnd()

Sets the end time of the appointment.

public setAppointmentEnd(DateTime|null $appointment_end) : void
Parameters
$appointment_end : DateTime|null

The end time of the appointment.

Return values
void

setAppointmentStart()

Sets the start time of the appointment.

public setAppointmentStart(DateTime|null $appointment_start) : void
Parameters
$appointment_start : DateTime|null

The start time of the appointment.

Return values
void

setCreatedAt()

Sets the creation date of the appointment.

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

The creation date of the appointment.

Return values
void

setDni()

Sets the DNI of the appointment.

public setDni(int|null $dni) : void
Parameters
$dni : int|null

The DNI of the appointment.

Return values
void

setEmail()

Sets the email of the appointment.

public setEmail(string|null $email) : void
Parameters
$email : string|null

The email of the appointment.

Return values
void

setFullName()

Sets the full name of the appointment.

public setFullName(string|null $full_name) : void
Parameters
$full_name : string|null

The full name of the appointment.

Return values
void

setId()

Sets the ID of the appointment.

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

The ID of the appointment.

Return values
void

setPhoneNumber()

Sets the phone number of the appointment.

public setPhoneNumber(string|null $phone_number) : void
Parameters
$phone_number : string|null

The phone number of the appointment.

Return values
void

setScheduleTimeSlotId()

Sets the ID of the schedule time slot for the appointment.

public setScheduleTimeSlotId(int|null $schedule_time_slot_id) : void
Parameters
$schedule_time_slot_id : int|null

The ID of the schedule time slot for the appointment.

Return values
void

setStatusId()

Sets the ID of the status for the appointment.

public setStatusId(int|null $status_id) : void
Parameters
$status_id : int|null

The ID of the status for the appointment.

Return values
void

Search results