feat: add contact repository and base repository for shared db logic
This commit is contained in:
8
internal/repository/interfaces.go
Normal file
8
internal/repository/interfaces.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package repository
|
||||
|
||||
type Repository[T any] interface {
|
||||
BuildQuery(s string) string
|
||||
GetByID(id int) (*T, error)
|
||||
GetAll() ([]T, error)
|
||||
Delete(id int) error
|
||||
}
|
||||
Reference in New Issue
Block a user