Fix enums in generated admin schema code.
This commit is contained in:
parent
3ffdea90c3
commit
be5c1f9197
5 changed files with 36 additions and 10 deletions
|
|
@ -15,7 +15,7 @@ type FieldSchema struct {
|
|||
Optional bool
|
||||
Immutable bool
|
||||
Sensitive bool
|
||||
Enums []Enum
|
||||
Enums []string
|
||||
}
|
||||
|
||||
const NamePasswordToken = "PasswordToken"
|
||||
|
|
@ -98,4 +98,16 @@ var fieldsUser = []*FieldSchema{
|
|||
Sensitive: false,
|
||||
Enums: nil,
|
||||
},
|
||||
{
|
||||
Name: "role",
|
||||
Type: field.TypeEnum,
|
||||
Optional: false,
|
||||
Immutable: false,
|
||||
Sensitive: false,
|
||||
Enums: []string{
|
||||
"read",
|
||||
"write",
|
||||
"admin",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue