doc: add enum to go-type example (#1059)

This commit is contained in:
Ariel Mashraki
2020-12-18 14:47:11 +02:00
committed by GitHub
parent 072cccff23
commit 5f44fdf78b

View File

@@ -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),
}
}
```