mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
doc: add enum to go-type example (#1059)
This commit is contained in:
@@ -213,6 +213,9 @@ func (Card) Fields() []ent.Field {
|
||||
Optional().
|
||||
// A ValueScanner type.
|
||||
GoType(&sql.NullString{}),
|
||||
field.Enum("role").
|
||||
// A convertible type to string.
|
||||
GoType(role.Unknown),
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user