feat: services: crus, migrations

This commit is contained in:
2025-01-04 01:36:01 +07:00
parent 0c9f60bba5
commit 081ebf2b28
22 changed files with 533 additions and 63 deletions

View File

@@ -0,0 +1,10 @@
package services
type Service[T any] interface {
GetAll() ([]*T, error)
GetById(id uint) (*T, error)
Create(item T) (T, error)
Update(item T) (T, error)
Delete(item T) (T, error)
Count() (int64, error)
}