mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
doc: add example for uuid default value (#996)
This commit is contained in:
@@ -127,7 +127,8 @@ func (Group) Fields() []ent.Field {
|
||||
// Fields of the Blob.
|
||||
func (Blob) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.UUID("id", uuid.UUID{}),
|
||||
field.UUID("id", uuid.UUID{}).
|
||||
Default(uuid.New),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user