Overview
BarberApp uses strongly-typed TypeScript interfaces to define its domain models. All models are located insrc/app/core/models/ and follow Angular’s Clean Architecture principles.
User Models
UserBase
The base interface for all user types in the system. Location:src/app/core/models/user-base.model.ts:3
Unique identifier for the user
User’s first name
User’s last name
National identity document number (DNI)
User’s sex:
male, female, other, or unspecifiedUser’s date of birth
User’s email address (used for authentication)
User’s password (optional, not stored in Firestore)
User’s phone number
Cloudinary URL for the user’s profile picture
When the user registered in the system
User’s role:
admin, client, specialist, or userAccount status:
active, inactive, or disabledClient
ExtendsUserBase with client-specific fields.
Location: src/app/core/models/client.model.ts:3
Client’s height in centimeters
Client’s weight in kilograms
Specialist
ExtendsUserBase with specialist-specific fields.
Location: src/app/core/models/specialist.model.ts:3
Array of specialties the specialist can perform
Weekly availability schedule for appointments
Name of the availability preset (from
AVAILABILITY_PRESETS_OPTIONS)Appointment Model
Appointment
Core model representing a scheduled appointment between a client and a specialist. Location:src/app/core/models/appointment.model.ts:4
Unique appointment identifier (generated with
AutoId.newId())ID of the client who booked the appointment
ID of the specialist performing the service
Denormalized specialist first name for quick display
Denormalized specialist last name for quick display
Denormalized client first name for quick display
Denormalized client last name for quick display
Current status:
pending, canceled, or completedScheduled date and time of the appointment
The specialty/service being performed
When the appointment was created
Reason provided when appointment was canceled
Who canceled the appointment:
client or specialistMedical diagnosis added after completion
Client rating provided after completion
Supporting Models
Specialty
Represents a service or specialty offered by specialists. Location:src/app/core/models/specialty.model.ts:1
Unique specialty identifier
Display name of the specialty
Detailed description of the specialty
Whether this specialty is currently available for booking
Availability
Defines a specialist’s weekly availability schedule. Location:src/app/core/models/availability.model.ts:1
Availability Fields
Availability Fields
TimeInterval Fields
TimeInterval Fields
Diagnosis
Medical diagnosis information added to completed appointments. Location:src/app/core/models/diagnosis.model.ts:1
Main diagnosis details
Additional notes or observations
Rating
Client rating for a completed appointment. Location:src/app/core/models/rating.model.ts:1
Rating score from 1 to 5 stars
Optional comment explaining the rating
Enums
AppointmentStatus
UserRoles
UserStatus
Sex
All enums are located in
src/app/core/enums/ and are exported from the main index file.