-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
45 lines (39 loc) · 1.54 KB
/
models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package autodocs
import (
"github.com/DmitryVesenniy/go-rest-framework/framework/views"
)
type ReferenceData struct {
PresentationField string `json:"presentationField"`
}
type ReferenceTable struct {
TableName string `json:"tableName"`
PkField string `json:"pkField"`
}
type SerializerField struct {
NameField string `json:"nameField"`
Title string `json:"title"`
Type string `json:"type"`
Signatura interface{} `json:"signatura"`
Required bool `json:"required"`
ReadOnly bool `json:"readOnly"`
WriteOnly bool `json:"writeOnly"`
ReferenceData *ReferenceData `json:"referenceData"`
ReferenceTable *ReferenceTable `json:"referenceTable"`
ProxyField *ReferenceData `json:"proxyField"`
}
type ViewData struct {
ViewType views.ViewType `json:"viewType"`
MethodsAllow []views.ViewSetMethod `json:"methodsAllow"`
TableName string `json:"tableName"`
FilterFields []FilterField `json:"filterFields"`
SortAllowFields []string `json:"sortAllowFields"`
SerializersFields []SerializerField `json:"serializersFields"`
Description string `json:"description"`
PermissionModule string `json:"permissionModule"`
}
type FilterField struct {
ParamName string `json:"paramName"`
TypeQueryParam interface{} `json:"typeQueryParam"`
Enum interface{} `json:"enum"`
Directory string `json:"directory"`
}