Project structure¶
This application helps you to schedule appointments with your clients. It is a simple application that allows any client to schedule an appointment for a service.
Model Structure¶
The application has eleven (11) models:
- Service
- StaffMember
- AppointmentRequest
- AppointmentRescheduleHistory
- Appointment
- Config
- PaymentInfo
- EmailVerificationCode
- PasswordResetToken
- DayOff
- WorkingHours
Service¶
It represents a service provided by the system, including details such as the name, description, duration, price, and an image representing the service. It also handles the currency and down payment information. More details here.
StaffMember¶
This model is linked to a user and represents a staff member who offers services. It contains information about the services offered, working hours, and availability on weekends. More details.
Appointment Request¶
Represents a request for an appointment made by a client. It includes the date, start and end times, selected service, staff member, and payment type for the appointment.
The appointment request is used to create the appointment. An appointment is considered having more information than that, and since we don't want to overload the appointment model, we use the appointment request to store all the information about the appointment. More details here.
Appointment Reschedule History¶
Records each time a client asks to move an appointment. It keeps the date, time and staff member the appointment had
before the change, along with the reason given and whether the reschedule is still pending or has been
confirmed. This is what lets the confirmation email show "from" and "to" times, and what enforces the per-service
reschedule limit.
More details here.
Appointment¶
The appointment model is used to define the last step in the appointment scheduling. A confirmed appointment is created when a client confirms an appointment request. It includes the client information, appointment request details, and additional information such as phone number and address. More details here.
Config¶
Hold the configuration settings for the appointment system such as slot duration, working hours, and buffer time between appointments. More details here.
PaymentInfo¶
Contains payment information for an appointment, linked to a specific appointment.
The model provides several methods to access related appointment details, such as service name, price, currency, client name, and email. It also includes a method to update the payment status.
EmailVerificationCode¶
The EmailVerificationCode model is used to represent an email verification code for a user when the email already exists in the database. Or when the user wants to change their email address. The model includes a class method to generate a new verification code for a user.
PasswordResetToken¶
A single-use, expiring token that lets a newly created client — or a newly created staff member — set their password from a link sent by email. Creating a new token invalidates the user's previous ones, so only the latest link works. More details here.
DayOff¶
The DayOff model is used to represent a day off for a staff member. It includes the start date, the end date, an optional description, and the staff member associated with the day off.
WorkingHours¶
The WorkingHours model is used to represent the working hours for a staff member on a given day of the week. It includes the day of the week, the start and end times, and the staff member associated with the working hours.
Next steps¶
- Configuration — every setting you can override in
settings.py. - Models reference — full field and method documentation for each model.