mirror of
https://github.com/ent/ent.git
synced 2026-05-03 08:00:58 +03:00
doc/schema-fields: add example for id with custom storage-key
This commit is contained in:
committed by
Ariel Mashraki
parent
99a9d6cf9b
commit
fe5d98aae1
@@ -127,7 +127,8 @@ func (Group) Fields() []ent.Field {
|
||||
func (Blob) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.UUID("id", uuid.UUID{}).
|
||||
Default(uuid.New),
|
||||
Default(uuid.New).
|
||||
StorageKey("oid"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user