repository

package
v0.0.0-...-8f202a6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAppointmentRepository

func NewAppointmentRepository(db *sql.DB) domain.AppointmentRepository

Types

type AppointmentRepository

type AppointmentRepository struct {
	// contains filtered or unexported fields
}

func (*AppointmentRepository) Cancel

Cancel cancels an appointment

func (*AppointmentRepository) CheckAvailability

func (r *AppointmentRepository) CheckAvailability(ctx context.Context, req *domain.CheckAvailabilityRequest) (bool, error)

CheckAvailability checks if a time slot is available for a doctor

func (*AppointmentRepository) Create

func (r *AppointmentRepository) Create(ctx context.Context, appointment *domain.Appointment) error

Create creates a new appointment

func (*AppointmentRepository) GetByDoctorID

func (r *AppointmentRepository) GetByDoctorID(ctx context.Context, doctorID uuid.UUID, page, limit int) ([]domain.Appointment, int64, error)

GetByDoctorID gets appointments for a doctor with pagination

func (*AppointmentRepository) GetByID

GetByID gets an appointment by ID with related data

func (*AppointmentRepository) GetByUserID

func (r *AppointmentRepository) GetByUserID(ctx context.Context, userID uuid.UUID, page, limit int) ([]domain.Appointment, int64, error)

GetByUserID gets appointments for a user with pagination

func (*AppointmentRepository) Reschedule

func (r *AppointmentRepository) Reschedule(ctx context.Context, id uuid.UUID, date time.Time, timeSlot string) error

Reschedule updates appointment date and time, and increments reschedule count

func (*AppointmentRepository) Update

func (r *AppointmentRepository) Update(ctx context.Context, appointment *domain.Appointment) error

Update updates an appointment

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL