chore: initial commit of ai site platform
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
15
platform/internal/crud/engine.go
Normal file
15
platform/internal/crud/engine.go
Normal file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user