Request interfaces

This commit is contained in:
Warky 2025-01-09 08:20:02 +02:00
parent 6dd6abb2e8
commit 2ac0404222
2 changed files with 13 additions and 0 deletions

View File

@ -7,3 +7,15 @@ type GormTableNameInterface interface {
type GormTableSchemaInterface interface { type GormTableSchemaInterface interface {
TableSchema() string 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
}

View File

@ -33,6 +33,7 @@ type PreloadOption struct {
Filters []FilterOption `json:"filters"` Filters []FilterOption `json:"filters"`
Limit *int `json:"limit"` Limit *int `json:"limit"`
Offset *int `json:"offset"` Offset *int `json:"offset"`
Updatable *bool `json:"updateable"` // if true, the relation can be updated
} }
type FilterOption struct { type FilterOption struct {