Dump changes

This commit is contained in:
Andrey Chervyakov 2022-06-03 23:44:08 +06:00
parent e12550a643
commit aac2ea1b74
Signed by: cognio
GPG key ID: DAA316147EB0D58D
25 changed files with 129 additions and 76 deletions

View file

@ -0,0 +1,19 @@
package appointment
import (
"brainbuffer/pkg/brainbuffer/domain/repository"
"time"
)
type Repository interface {
Save(appointment *Appointment) error
FindByID(id int64) (*Appointment, error)
GetAllByTask(taskId int64, page repository.Page) (Appointments, error)
GetAllByTasks(taskIds []int64, page repository.Page) (Appointments, error)
GetAllByTasksBefore(taskIds []int64, beforeTime time.Time, page repository.Page) (Appointments, error)
DeleteAllByTask(taskId int64) error
}
func NewRepository() Repository {
return &inMemoryRepository{}
}