Interface IAppointmentRepository

interface IAppointmentRepository {
    cancelAppointmentsByBarber(
        barberId: string,
        startDate: Date,
        endDate: Date,
        reason: string,
    ): Promise<number>;
    checkAvailability(barberId: string, timeSlot: TimeSlotVO): Promise<boolean>;
    confirmAppointment(
        appointmentId: string,
    ): Promise<
        {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        },
    >;
    count(filter?: IFilterOptions): Promise<number>;
    create(
        entity: {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        },
    ): Promise<
        {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        },
    >;
    delete(id: string): Promise<void>;
    exists(filter: IFilterOptions): Promise<boolean>;
    findAll(): Promise<
        {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        }[],
    >;
    findAvailableTimeSlots(
        barberId: string,
        date: Date,
        duration: number,
    ): Promise<TimeSlotVO[]>;
    findByBarber(
        barberId: string,
        options?: IQueryOptions,
    ): Promise<
        IPagedResult<
            {
                actualDuration?: number;
                additionalServices?: {
                    notes?: string;
                    price: number;
                    serviceId: string;
                }[];
                barberId: string;
                cancellationReason?: string;
                cancelledAt?: Date;
                cancelledBy?: string;
                completedAt?: Date;
                completedBy?: string;
                createdAt: Date;
                customerId: string;
                endTime: Date;
                feedback?: {
                    cleanliness?: number;
                    comment?: string;
                    rating?: number;
                    serviceQuality?: number;
                    timeliness?: number;
                };
                id: string;
                notes?: string;
                paymentMethod?: "CASH"
                | "CARD"
                | "DIGITAL_WALLET";
                paymentStatus?: "PAID" | "PENDING" | "FAILED";
                reschedulingHistory?: {
                    previousBarberId: string;
                    previousEndTime: Date;
                    previousStartTime: Date;
                    reason?: string;
                    rescheduledAt: Date;
                    rescheduledBy: string;
                }[];
                serviceId: string;
                startTime: Date;
                status: "pending"
                | "confirmed"
                | "cancelled"
                | "completed";
                totalAmount?: number;
                updatedAt: Date;
            },
        >,
    >;
    findByCustomer(
        customerId: string,
        options?: IQueryOptions,
    ): Promise<
        IPagedResult<
            {
                actualDuration?: number;
                additionalServices?: {
                    notes?: string;
                    price: number;
                    serviceId: string;
                }[];
                barberId: string;
                cancellationReason?: string;
                cancelledAt?: Date;
                cancelledBy?: string;
                completedAt?: Date;
                completedBy?: string;
                createdAt: Date;
                customerId: string;
                endTime: Date;
                feedback?: {
                    cleanliness?: number;
                    comment?: string;
                    rating?: number;
                    serviceQuality?: number;
                    timeliness?: number;
                };
                id: string;
                notes?: string;
                paymentMethod?: "CASH"
                | "CARD"
                | "DIGITAL_WALLET";
                paymentStatus?: "PAID" | "PENDING" | "FAILED";
                reschedulingHistory?: {
                    previousBarberId: string;
                    previousEndTime: Date;
                    previousStartTime: Date;
                    reason?: string;
                    rescheduledAt: Date;
                    rescheduledBy: string;
                }[];
                serviceId: string;
                startTime: Date;
                status: "pending"
                | "confirmed"
                | "cancelled"
                | "completed";
                totalAmount?: number;
                updatedAt: Date;
            },
        >,
    >;
    findByDateRange(
        startDate: Date,
        endDate: Date,
        options?: IQueryOptions,
    ): Promise<
        IPagedResult<
            {
                actualDuration?: number;
                additionalServices?: {
                    notes?: string;
                    price: number;
                    serviceId: string;
                }[];
                barberId: string;
                cancellationReason?: string;
                cancelledAt?: Date;
                cancelledBy?: string;
                completedAt?: Date;
                completedBy?: string;
                createdAt: Date;
                customerId: string;
                endTime: Date;
                feedback?: {
                    cleanliness?: number;
                    comment?: string;
                    rating?: number;
                    serviceQuality?: number;
                    timeliness?: number;
                };
                id: string;
                notes?: string;
                paymentMethod?: "CASH"
                | "CARD"
                | "DIGITAL_WALLET";
                paymentStatus?: "PAID" | "PENDING" | "FAILED";
                reschedulingHistory?: {
                    previousBarberId: string;
                    previousEndTime: Date;
                    previousStartTime: Date;
                    reason?: string;
                    rescheduledAt: Date;
                    rescheduledBy: string;
                }[];
                serviceId: string;
                startTime: Date;
                status: "pending"
                | "confirmed"
                | "cancelled"
                | "completed";
                totalAmount?: number;
                updatedAt: Date;
            },
        >,
    >;
    findById(
        id: string,
    ): Promise<
        | null
        | {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        },
    >;
    findByStatus(
        status: "pending" | "confirmed" | "cancelled" | "completed",
        options?: IQueryOptions,
    ): Promise<
        IPagedResult<
            {
                actualDuration?: number;
                additionalServices?: {
                    notes?: string;
                    price: number;
                    serviceId: string;
                }[];
                barberId: string;
                cancellationReason?: string;
                cancelledAt?: Date;
                cancelledBy?: string;
                completedAt?: Date;
                completedBy?: string;
                createdAt: Date;
                customerId: string;
                endTime: Date;
                feedback?: {
                    cleanliness?: number;
                    comment?: string;
                    rating?: number;
                    serviceQuality?: number;
                    timeliness?: number;
                };
                id: string;
                notes?: string;
                paymentMethod?: "CASH"
                | "CARD"
                | "DIGITAL_WALLET";
                paymentStatus?: "PAID" | "PENDING" | "FAILED";
                reschedulingHistory?: {
                    previousBarberId: string;
                    previousEndTime: Date;
                    previousStartTime: Date;
                    reason?: string;
                    rescheduledAt: Date;
                    rescheduledBy: string;
                }[];
                serviceId: string;
                startTime: Date;
                status: "pending"
                | "confirmed"
                | "cancelled"
                | "completed";
                totalAmount?: number;
                updatedAt: Date;
            },
        >,
    >;
    findOne(
        filter: IFilterOptions,
    ): Promise<
        | null
        | {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        },
    >;
    findOverlappingAppointments(
        barberId: string,
        timeSlot: TimeSlotVO,
    ): Promise<
        {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        }[],
    >;
    findWithFilters(
        filters: IFilterOptions,
        options?: IQueryOptions,
    ): Promise<
        IPagedResult<
            {
                actualDuration?: number;
                additionalServices?: {
                    notes?: string;
                    price: number;
                    serviceId: string;
                }[];
                barberId: string;
                cancellationReason?: string;
                cancelledAt?: Date;
                cancelledBy?: string;
                completedAt?: Date;
                completedBy?: string;
                createdAt: Date;
                customerId: string;
                endTime: Date;
                feedback?: {
                    cleanliness?: number;
                    comment?: string;
                    rating?: number;
                    serviceQuality?: number;
                    timeliness?: number;
                };
                id: string;
                notes?: string;
                paymentMethod?: "CASH"
                | "CARD"
                | "DIGITAL_WALLET";
                paymentStatus?: "PAID" | "PENDING" | "FAILED";
                reschedulingHistory?: {
                    previousBarberId: string;
                    previousEndTime: Date;
                    previousStartTime: Date;
                    reason?: string;
                    rescheduledAt: Date;
                    rescheduledBy: string;
                }[];
                serviceId: string;
                startTime: Date;
                status: "pending"
                | "confirmed"
                | "cancelled"
                | "completed";
                totalAmount?: number;
                updatedAt: Date;
            },
        >,
    >;
    getBarberSchedule(barberId: string, date: Date): Promise<TimeSlotVO[]>;
    getConflictingAppointments(
        timeSlot: TimeSlotVO,
        excludeAppointmentId?: string,
    ): Promise<
        {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        }[],
    >;
    getPastAppointments(
        customerId: string,
        options?: IQueryOptions,
    ): Promise<
        IPagedResult<
            {
                actualDuration?: number;
                additionalServices?: {
                    notes?: string;
                    price: number;
                    serviceId: string;
                }[];
                barberId: string;
                cancellationReason?: string;
                cancelledAt?: Date;
                cancelledBy?: string;
                completedAt?: Date;
                completedBy?: string;
                createdAt: Date;
                customerId: string;
                endTime: Date;
                feedback?: {
                    cleanliness?: number;
                    comment?: string;
                    rating?: number;
                    serviceQuality?: number;
                    timeliness?: number;
                };
                id: string;
                notes?: string;
                paymentMethod?: "CASH"
                | "CARD"
                | "DIGITAL_WALLET";
                paymentStatus?: "PAID" | "PENDING" | "FAILED";
                reschedulingHistory?: {
                    previousBarberId: string;
                    previousEndTime: Date;
                    previousStartTime: Date;
                    reason?: string;
                    rescheduledAt: Date;
                    rescheduledBy: string;
                }[];
                serviceId: string;
                startTime: Date;
                status: "pending"
                | "confirmed"
                | "cancelled"
                | "completed";
                totalAmount?: number;
                updatedAt: Date;
            },
        >,
    >;
    getUpcomingAppointments(
        customerId: string,
        options?: IQueryOptions,
    ): Promise<
        IPagedResult<
            {
                actualDuration?: number;
                additionalServices?: {
                    notes?: string;
                    price: number;
                    serviceId: string;
                }[];
                barberId: string;
                cancellationReason?: string;
                cancelledAt?: Date;
                cancelledBy?: string;
                completedAt?: Date;
                completedBy?: string;
                createdAt: Date;
                customerId: string;
                endTime: Date;
                feedback?: {
                    cleanliness?: number;
                    comment?: string;
                    rating?: number;
                    serviceQuality?: number;
                    timeliness?: number;
                };
                id: string;
                notes?: string;
                paymentMethod?: "CASH"
                | "CARD"
                | "DIGITAL_WALLET";
                paymentStatus?: "PAID" | "PENDING" | "FAILED";
                reschedulingHistory?: {
                    previousBarberId: string;
                    previousEndTime: Date;
                    previousStartTime: Date;
                    reason?: string;
                    rescheduledAt: Date;
                    rescheduledBy: string;
                }[];
                serviceId: string;
                startTime: Date;
                status: "pending"
                | "confirmed"
                | "cancelled"
                | "completed";
                totalAmount?: number;
                updatedAt: Date;
            },
        >,
    >;
    markAsCompleted(
        appointmentId: string,
        notes?: string,
    ): Promise<
        {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        },
    >;
    rescheduleAppointment(
        appointmentId: string,
        newTimeSlot: TimeSlotVO,
    ): Promise<
        {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        },
    >;
    update(
        id: string,
        entity: {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        },
    ): Promise<
        {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        },
    >;
}

Hierarchy (View Summary)

Implemented by

Methods

  • Parameters

    • barberId: string
    • startDate: Date
    • endDate: Date
    • reason: string

    Returns Promise<number>

  • Parameters

    Returns Promise<boolean>

  • Parameters

    • appointmentId: string

    Returns Promise<
        {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        },
    >

  • Parameters

    • entity: {
          actualDuration?: number;
          additionalServices?: { notes?: string; price: number; serviceId: string }[];
          barberId: string;
          cancellationReason?: string;
          cancelledAt?: Date;
          cancelledBy?: string;
          completedAt?: Date;
          completedBy?: string;
          createdAt: Date;
          customerId: string;
          endTime: Date;
          feedback?: {
              cleanliness?: number;
              comment?: string;
              rating?: number;
              serviceQuality?: number;
              timeliness?: number;
          };
          id: string;
          notes?: string;
          paymentMethod?: "CASH"
          | "CARD"
          | "DIGITAL_WALLET";
          paymentStatus?: "PAID" | "PENDING" | "FAILED";
          reschedulingHistory?: {
              previousBarberId: string;
              previousEndTime: Date;
              previousStartTime: Date;
              reason?: string;
              rescheduledAt: Date;
              rescheduledBy: string;
          }[];
          serviceId: string;
          startTime: Date;
          status: "pending"
          | "confirmed"
          | "cancelled"
          | "completed";
          totalAmount?: number;
          updatedAt: Date;
      }

    Returns Promise<
        {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        },
    >

  • Parameters

    • id: string

    Returns Promise<void>

  • Returns Promise<
        {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        }[],
    >

  • Parameters

    • barberId: string
    • date: Date
    • duration: number

    Returns Promise<TimeSlotVO[]>

  • Parameters

    Returns Promise<
        IPagedResult<
            {
                actualDuration?: number;
                additionalServices?: { notes?: string; price: number; serviceId: string }[];
                barberId: string;
                cancellationReason?: string;
                cancelledAt?: Date;
                cancelledBy?: string;
                completedAt?: Date;
                completedBy?: string;
                createdAt: Date;
                customerId: string;
                endTime: Date;
                feedback?: {
                    cleanliness?: number;
                    comment?: string;
                    rating?: number;
                    serviceQuality?: number;
                    timeliness?: number;
                };
                id: string;
                notes?: string;
                paymentMethod?: "CASH"
                | "CARD"
                | "DIGITAL_WALLET";
                paymentStatus?: "PAID" | "PENDING" | "FAILED";
                reschedulingHistory?: {
                    previousBarberId: string;
                    previousEndTime: Date;
                    previousStartTime: Date;
                    reason?: string;
                    rescheduledAt: Date;
                    rescheduledBy: string;
                }[];
                serviceId: string;
                startTime: Date;
                status: "pending"
                | "confirmed"
                | "cancelled"
                | "completed";
                totalAmount?: number;
                updatedAt: Date;
            },
        >,
    >

  • Parameters

    Returns Promise<
        IPagedResult<
            {
                actualDuration?: number;
                additionalServices?: { notes?: string; price: number; serviceId: string }[];
                barberId: string;
                cancellationReason?: string;
                cancelledAt?: Date;
                cancelledBy?: string;
                completedAt?: Date;
                completedBy?: string;
                createdAt: Date;
                customerId: string;
                endTime: Date;
                feedback?: {
                    cleanliness?: number;
                    comment?: string;
                    rating?: number;
                    serviceQuality?: number;
                    timeliness?: number;
                };
                id: string;
                notes?: string;
                paymentMethod?: "CASH"
                | "CARD"
                | "DIGITAL_WALLET";
                paymentStatus?: "PAID" | "PENDING" | "FAILED";
                reschedulingHistory?: {
                    previousBarberId: string;
                    previousEndTime: Date;
                    previousStartTime: Date;
                    reason?: string;
                    rescheduledAt: Date;
                    rescheduledBy: string;
                }[];
                serviceId: string;
                startTime: Date;
                status: "pending"
                | "confirmed"
                | "cancelled"
                | "completed";
                totalAmount?: number;
                updatedAt: Date;
            },
        >,
    >

  • Parameters

    Returns Promise<
        IPagedResult<
            {
                actualDuration?: number;
                additionalServices?: { notes?: string; price: number; serviceId: string }[];
                barberId: string;
                cancellationReason?: string;
                cancelledAt?: Date;
                cancelledBy?: string;
                completedAt?: Date;
                completedBy?: string;
                createdAt: Date;
                customerId: string;
                endTime: Date;
                feedback?: {
                    cleanliness?: number;
                    comment?: string;
                    rating?: number;
                    serviceQuality?: number;
                    timeliness?: number;
                };
                id: string;
                notes?: string;
                paymentMethod?: "CASH"
                | "CARD"
                | "DIGITAL_WALLET";
                paymentStatus?: "PAID" | "PENDING" | "FAILED";
                reschedulingHistory?: {
                    previousBarberId: string;
                    previousEndTime: Date;
                    previousStartTime: Date;
                    reason?: string;
                    rescheduledAt: Date;
                    rescheduledBy: string;
                }[];
                serviceId: string;
                startTime: Date;
                status: "pending"
                | "confirmed"
                | "cancelled"
                | "completed";
                totalAmount?: number;
                updatedAt: Date;
            },
        >,
    >

  • Parameters

    • id: string

    Returns Promise<
        | null
        | {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        },
    >

  • Parameters

    • status: "pending" | "confirmed" | "cancelled" | "completed"
    • Optionaloptions: IQueryOptions

    Returns Promise<
        IPagedResult<
            {
                actualDuration?: number;
                additionalServices?: { notes?: string; price: number; serviceId: string }[];
                barberId: string;
                cancellationReason?: string;
                cancelledAt?: Date;
                cancelledBy?: string;
                completedAt?: Date;
                completedBy?: string;
                createdAt: Date;
                customerId: string;
                endTime: Date;
                feedback?: {
                    cleanliness?: number;
                    comment?: string;
                    rating?: number;
                    serviceQuality?: number;
                    timeliness?: number;
                };
                id: string;
                notes?: string;
                paymentMethod?: "CASH"
                | "CARD"
                | "DIGITAL_WALLET";
                paymentStatus?: "PAID" | "PENDING" | "FAILED";
                reschedulingHistory?: {
                    previousBarberId: string;
                    previousEndTime: Date;
                    previousStartTime: Date;
                    reason?: string;
                    rescheduledAt: Date;
                    rescheduledBy: string;
                }[];
                serviceId: string;
                startTime: Date;
                status: "pending"
                | "confirmed"
                | "cancelled"
                | "completed";
                totalAmount?: number;
                updatedAt: Date;
            },
        >,
    >

  • Parameters

    Returns Promise<
        | null
        | {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        },
    >

  • Parameters

    Returns Promise<
        {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        }[],
    >

  • Parameters

    Returns Promise<
        IPagedResult<
            {
                actualDuration?: number;
                additionalServices?: { notes?: string; price: number; serviceId: string }[];
                barberId: string;
                cancellationReason?: string;
                cancelledAt?: Date;
                cancelledBy?: string;
                completedAt?: Date;
                completedBy?: string;
                createdAt: Date;
                customerId: string;
                endTime: Date;
                feedback?: {
                    cleanliness?: number;
                    comment?: string;
                    rating?: number;
                    serviceQuality?: number;
                    timeliness?: number;
                };
                id: string;
                notes?: string;
                paymentMethod?: "CASH"
                | "CARD"
                | "DIGITAL_WALLET";
                paymentStatus?: "PAID" | "PENDING" | "FAILED";
                reschedulingHistory?: {
                    previousBarberId: string;
                    previousEndTime: Date;
                    previousStartTime: Date;
                    reason?: string;
                    rescheduledAt: Date;
                    rescheduledBy: string;
                }[];
                serviceId: string;
                startTime: Date;
                status: "pending"
                | "confirmed"
                | "cancelled"
                | "completed";
                totalAmount?: number;
                updatedAt: Date;
            },
        >,
    >

  • Parameters

    • barberId: string
    • date: Date

    Returns Promise<TimeSlotVO[]>

  • Parameters

    • timeSlot: TimeSlotVO
    • OptionalexcludeAppointmentId: string

    Returns Promise<
        {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        }[],
    >

  • Parameters

    Returns Promise<
        IPagedResult<
            {
                actualDuration?: number;
                additionalServices?: { notes?: string; price: number; serviceId: string }[];
                barberId: string;
                cancellationReason?: string;
                cancelledAt?: Date;
                cancelledBy?: string;
                completedAt?: Date;
                completedBy?: string;
                createdAt: Date;
                customerId: string;
                endTime: Date;
                feedback?: {
                    cleanliness?: number;
                    comment?: string;
                    rating?: number;
                    serviceQuality?: number;
                    timeliness?: number;
                };
                id: string;
                notes?: string;
                paymentMethod?: "CASH"
                | "CARD"
                | "DIGITAL_WALLET";
                paymentStatus?: "PAID" | "PENDING" | "FAILED";
                reschedulingHistory?: {
                    previousBarberId: string;
                    previousEndTime: Date;
                    previousStartTime: Date;
                    reason?: string;
                    rescheduledAt: Date;
                    rescheduledBy: string;
                }[];
                serviceId: string;
                startTime: Date;
                status: "pending"
                | "confirmed"
                | "cancelled"
                | "completed";
                totalAmount?: number;
                updatedAt: Date;
            },
        >,
    >

  • Parameters

    Returns Promise<
        IPagedResult<
            {
                actualDuration?: number;
                additionalServices?: { notes?: string; price: number; serviceId: string }[];
                barberId: string;
                cancellationReason?: string;
                cancelledAt?: Date;
                cancelledBy?: string;
                completedAt?: Date;
                completedBy?: string;
                createdAt: Date;
                customerId: string;
                endTime: Date;
                feedback?: {
                    cleanliness?: number;
                    comment?: string;
                    rating?: number;
                    serviceQuality?: number;
                    timeliness?: number;
                };
                id: string;
                notes?: string;
                paymentMethod?: "CASH"
                | "CARD"
                | "DIGITAL_WALLET";
                paymentStatus?: "PAID" | "PENDING" | "FAILED";
                reschedulingHistory?: {
                    previousBarberId: string;
                    previousEndTime: Date;
                    previousStartTime: Date;
                    reason?: string;
                    rescheduledAt: Date;
                    rescheduledBy: string;
                }[];
                serviceId: string;
                startTime: Date;
                status: "pending"
                | "confirmed"
                | "cancelled"
                | "completed";
                totalAmount?: number;
                updatedAt: Date;
            },
        >,
    >

  • Parameters

    • appointmentId: string
    • Optionalnotes: string

    Returns Promise<
        {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        },
    >

  • Parameters

    Returns Promise<
        {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        },
    >

  • Parameters

    • id: string
    • entity: {
          actualDuration?: number;
          additionalServices?: { notes?: string; price: number; serviceId: string }[];
          barberId: string;
          cancellationReason?: string;
          cancelledAt?: Date;
          cancelledBy?: string;
          completedAt?: Date;
          completedBy?: string;
          createdAt: Date;
          customerId: string;
          endTime: Date;
          feedback?: {
              cleanliness?: number;
              comment?: string;
              rating?: number;
              serviceQuality?: number;
              timeliness?: number;
          };
          id: string;
          notes?: string;
          paymentMethod?: "CASH"
          | "CARD"
          | "DIGITAL_WALLET";
          paymentStatus?: "PAID" | "PENDING" | "FAILED";
          reschedulingHistory?: {
              previousBarberId: string;
              previousEndTime: Date;
              previousStartTime: Date;
              reason?: string;
              rescheduledAt: Date;
              rescheduledBy: string;
          }[];
          serviceId: string;
          startTime: Date;
          status: "pending"
          | "confirmed"
          | "cancelled"
          | "completed";
          totalAmount?: number;
          updatedAt: Date;
      }

    Returns Promise<
        {
            actualDuration?: number;
            additionalServices?: { notes?: string; price: number; serviceId: string }[];
            barberId: string;
            cancellationReason?: string;
            cancelledAt?: Date;
            cancelledBy?: string;
            completedAt?: Date;
            completedBy?: string;
            createdAt: Date;
            customerId: string;
            endTime: Date;
            feedback?: {
                cleanliness?: number;
                comment?: string;
                rating?: number;
                serviceQuality?: number;
                timeliness?: number;
            };
            id: string;
            notes?: string;
            paymentMethod?: "CASH"
            | "CARD"
            | "DIGITAL_WALLET";
            paymentStatus?: "PAID" | "PENDING" | "FAILED";
            reschedulingHistory?: {
                previousBarberId: string;
                previousEndTime: Date;
                previousStartTime: Date;
                reason?: string;
                rescheduledAt: Date;
                rescheduledBy: string;
            }[];
            serviceId: string;
            startTime: Date;
            status: "pending"
            | "confirmed"
            | "cancelled"
            | "completed";
            totalAmount?: number;
            updatedAt: Date;
        },
    >