schema/field: initial work for UUID fields

Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/175

Reviewed By: idoshveki

Differential Revision: D18614288

fbshipit-source-id: d36e6dc6e7745e982cf91bb4c4548dcd3d9d33ac
This commit is contained in:
Ariel Mashraki
2019-11-20 07:13:15 -08:00
committed by Facebook Github Bot
parent 49c8efce3c
commit 33d08673cf
3 changed files with 110 additions and 19 deletions

View File

@@ -15,6 +15,7 @@ const (
TypeBool
TypeTime
TypeJSON
TypeUUID
TypeBytes
TypeEnum
TypeString
@@ -101,6 +102,7 @@ var (
TypeBool: "bool",
TypeTime: "time.Time",
TypeJSON: "json.RawMessage",
TypeUUID: "[16]byte",
TypeBytes: "[]byte",
TypeEnum: "string",
TypeString: "string",
@@ -119,6 +121,7 @@ var (
}
constNames = [...]string{
TypeJSON: "TypeJSON",
TypeUUID: "TypeUUID",
TypeTime: "TypeTime",
TypeEnum: "TypeEnum",
TypeBytes: "TypeBytes",