12345678910 |
- package dbmanager
- // Repository defines generic CRUD operations for any entity type
- type Repository[T Entity] interface {
- Create(entity T) error
- GetByID(id string) (T, error)
- Update(entity T) error
- Delete(id string) error
- List(filter map[string]interface{}) ([]T, error)
- }
|