From 2ac04042223c43cdca30e7d4d4a6113cac4b4c37 Mon Sep 17 00:00:00 2001 From: Hein Date: Thu, 9 Jan 2025 08:20:02 +0200 Subject: [PATCH] Request interfaces --- pkg/resolvespec/interfaces.go | 12 ++++++++++++ pkg/resolvespec/types.go | 1 + 2 files changed, 13 insertions(+) diff --git a/pkg/resolvespec/interfaces.go b/pkg/resolvespec/interfaces.go index 0fd2329..7641911 100644 --- a/pkg/resolvespec/interfaces.go +++ b/pkg/resolvespec/interfaces.go @@ -7,3 +7,15 @@ type GormTableNameInterface interface { type GormTableSchemaInterface interface { TableSchema() string } + +type GormTableCRUDRequest struct { + CRUDRequest *string `json:"crud_request"` +} + +func (r *GormTableCRUDRequest) SetRequest(request string) { + r.CRUDRequest = &request +} + +func (r GormTableCRUDRequest) GetRequest() string { + return *r.CRUDRequest +} diff --git a/pkg/resolvespec/types.go b/pkg/resolvespec/types.go index d17083d..50c4a79 100644 --- a/pkg/resolvespec/types.go +++ b/pkg/resolvespec/types.go @@ -33,6 +33,7 @@ type PreloadOption struct { Filters []FilterOption `json:"filters"` Limit *int `json:"limit"` Offset *int `json:"offset"` + Updatable *bool `json:"updateable"` // if true, the relation can be updated } type FilterOption struct {