28 lines
		
	
	
	
		
			821 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
	
		
			821 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package training
 | |
| 
 | |
| type Repository interface {
 | |
| 	Create(training *Training) error
 | |
| 	FindByID(id ID) (*Training, error)
 | |
| 	FindAll() ([]Training, error)
 | |
| 	Update(training *Training) error
 | |
| 	Delete(id ID) error
 | |
| }
 | |
| 
 | |
| type DateRepository interface {
 | |
| 	Create(trainingID ID, trainingDate *Date) error
 | |
| 	FindByID(id DateID) (*Date, error)
 | |
| 	FindAll() ([]Date, error)
 | |
| 	FindAllByTrainingID(trainingID ID) ([]Date, error)
 | |
| 	FindUpcomingByTrainingID(trainingID ID) ([]Date, error)
 | |
| 	Update(trainingDate *Date) error
 | |
| 	Delete(id DateID) error
 | |
| }
 | |
| 
 | |
| type AttendeeRepository interface {
 | |
| 	Create(trainingDateID DateID, attendee *Attendee) error
 | |
| 	FindByID(id AttendeeID) (*Attendee, error)
 | |
| 	FindAll() ([]Attendee, error)
 | |
| 	FindAllByTrainingDateID(trainingDateID DateID) ([]Attendee, error)
 | |
| 	Update(attendee *Attendee) error
 | |
| 	Delete(id AttendeeID) error
 | |
| }
 |