16 lines
706 B
Go
16 lines
706 B
Go
package crud
|
|
|
|
import (
|
|
"context"
|
|
|
|
"aijianzhan/platform/internal/meta"
|
|
)
|
|
|
|
type Engine interface {
|
|
List(ctx context.Context, ref *meta.ResourceRef, tenantID int64, page, pageSize int, filters map[string]string, sortBy string) (items []map[string]any, total int, err error)
|
|
Get(ctx context.Context, ref *meta.ResourceRef, tenantID int64, id string) (map[string]any, error)
|
|
Create(ctx context.Context, ref *meta.ResourceRef, tenantID, userID int64, body map[string]any) (map[string]any, error)
|
|
Update(ctx context.Context, ref *meta.ResourceRef, tenantID int64, id string, body map[string]any) (map[string]any, error)
|
|
Delete(ctx context.Context, ref *meta.ResourceRef, tenantID int64, id string) error
|
|
}
|