- Add initial project scaffolding with Go module and project structure - Create server and CLI entry points for application - Implement Makefile with development and build commands - Add `.env.example` with comprehensive configuration template - Set up README.md with project documentation and setup instructions - Configure basic dependencies for server, database, and CLI tools - Establish internal package structure for models, services, and handlers - Add initial configuration and environment management - Prepare for HTTP server, CLI, and database integration
43 lines
1.3 KiB
Go
43 lines
1.3 KiB
Go
package repositories
|
|
|
|
import (
|
|
"time"
|
|
|
|
"attune-heart-therapy/internal/models"
|
|
)
|
|
|
|
// UserRepository handles user data persistence
|
|
type UserRepository interface {
|
|
Create(user *models.User) error
|
|
GetByID(id uint) (*models.User, error)
|
|
GetByEmail(email string) (*models.User, error)
|
|
Update(user *models.User) error
|
|
GetActiveUsersCount() (int64, error)
|
|
}
|
|
|
|
// BookingRepository handles booking data persistence
|
|
type BookingRepository interface {
|
|
Create(booking *models.Booking) error
|
|
GetByID(id uint) (*models.Booking, error)
|
|
GetByUserID(userID uint) ([]models.Booking, error)
|
|
Update(booking *models.Booking) error
|
|
Delete(id uint) error
|
|
GetUpcomingBookings() ([]models.Booking, error)
|
|
}
|
|
|
|
// ScheduleRepository handles schedule data persistence
|
|
type ScheduleRepository interface {
|
|
Create(schedule *models.Schedule) error
|
|
GetAvailable(date time.Time) ([]models.Schedule, error)
|
|
Update(schedule *models.Schedule) error
|
|
GetByID(id uint) (*models.Schedule, error)
|
|
}
|
|
|
|
// NotificationRepository handles notification data persistence
|
|
type NotificationRepository interface {
|
|
Create(notification *models.Notification) error
|
|
GetByID(id uint) (*models.Notification, error)
|
|
Update(notification *models.Notification) error
|
|
GetPendingNotifications() ([]models.Notification, error)
|
|
}
|