From 25471666becf44d47f5a97b0cb96692c16de1e85 Mon Sep 17 00:00:00 2001 From: Ariel Mashraki <7413593+a8m@users.noreply.github.com> Date: Thu, 28 May 2020 18:34:14 +0300 Subject: [PATCH] entc/gen: fix format for field comments (#511) --- entc/gen/internal/bindata.go | 4 +- entc/gen/template/meta.tmpl | 5 +- entc/integration/customid/ent/blob/blob.go | 3 +- entc/integration/customid/ent/car/car.go | 3 +- entc/integration/ent/card/card.go | 14 ++- entc/integration/ent/comment/comment.go | 9 +- entc/integration/ent/fieldtype/fieldtype.go | 98 ++++++++++++------- entc/integration/ent/file/file.go | 12 ++- entc/integration/ent/filetype/filetype.go | 3 +- entc/integration/ent/group/group.go | 17 ++-- entc/integration/ent/groupinfo/groupinfo.go | 6 +- entc/integration/ent/node/node.go | 3 +- entc/integration/ent/pet/pet.go | 3 +- entc/integration/ent/user/user.go | 29 ++++-- entc/integration/gremlin/ent/card/card.go | 14 ++- .../gremlin/ent/comment/comment.go | 9 +- .../gremlin/ent/fieldtype/fieldtype.go | 98 ++++++++++++------- entc/integration/gremlin/ent/file/file.go | 12 ++- .../gremlin/ent/filetype/filetype.go | 3 +- entc/integration/gremlin/ent/group/group.go | 17 ++-- .../gremlin/ent/groupinfo/groupinfo.go | 6 +- entc/integration/gremlin/ent/node/node.go | 3 +- entc/integration/gremlin/ent/pet/pet.go | 3 +- entc/integration/gremlin/ent/user/user.go | 29 ++++-- entc/integration/hooks/ent/card/card.go | 9 +- entc/integration/hooks/ent/user/user.go | 8 +- entc/integration/idtype/ent/user/user.go | 3 +- entc/integration/json/ent/user/user.go | 18 ++-- entc/integration/migrate/entv1/user/user.go | 23 +++-- entc/integration/migrate/entv2/user/user.go | 29 ++++-- entc/integration/privacy/ent/galaxy/galaxy.go | 6 +- entc/integration/privacy/ent/planet/planet.go | 8 +- entc/integration/template/ent/group/group.go | 3 +- entc/integration/template/ent/pet/pet.go | 6 +- entc/integration/template/ent/user/user.go | 3 +- entc/integration/type_test.go | 4 +- examples/edgeindex/ent/city/city.go | 3 +- examples/edgeindex/ent/street/street.go | 3 +- examples/m2m2types/ent/group/group.go | 3 +- examples/m2m2types/ent/user/user.go | 6 +- examples/m2mbidi/ent/user/user.go | 6 +- examples/m2mrecur/ent/user/user.go | 6 +- examples/o2m2types/ent/pet/pet.go | 3 +- examples/o2m2types/ent/user/user.go | 6 +- examples/o2mrecur/ent/node/node.go | 3 +- examples/o2o2types/ent/card/card.go | 8 +- examples/o2o2types/ent/user/user.go | 6 +- examples/o2obidi/ent/user/user.go | 6 +- examples/o2orecur/ent/node/node.go | 3 +- examples/start/ent/car/car.go | 6 +- examples/start/ent/group/group.go | 3 +- examples/start/ent/user/user.go | 6 +- examples/traversal/ent/group/group.go | 3 +- examples/traversal/ent/pet/pet.go | 3 +- examples/traversal/ent/user/user.go | 6 +- 55 files changed, 401 insertions(+), 211 deletions(-) diff --git a/entc/gen/internal/bindata.go b/entc/gen/internal/bindata.go index 131ed286d..6e0b01245 100644 --- a/entc/gen/internal/bindata.go +++ b/entc/gen/internal/bindata.go @@ -966,7 +966,7 @@ func templateImportTmpl() (*asset, error) { return a, nil } -var _templateMetaTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x57\x5f\x6f\xdb\x36\x10\x7f\x96\x3e\xc5\x41\x70\x01\x3b\x48\xe4\xb6\x6f\x0b\x90\x87\x2e\x49\xd1\x60\x45\x51\x20\x49\x5f\x86\xa1\xa0\xc5\x93\x4d\x94\x22\x55\x92\x72\x9a\x09\xfe\xee\x03\x8f\x94\x44\x25\xce\xb6\xf6\xc5\x30\xc9\xbb\xdf\xfd\xe1\xdd\x8f\xa7\xbe\x5f\x9f\xe4\x97\xba\x7d\x34\x62\xbb\x73\xf0\xf6\xf5\x9b\xdf\xce\x5a\x83\x16\x95\x83\xf7\xac\xc2\x8d\xd6\xdf\xe0\x46\x55\x25\xbc\x93\x12\x48\xc8\x82\x3f\x37\x7b\xe4\x65\x7e\xb7\x13\x16\xac\xee\x4c\x85\x50\x69\x8e\x20\x2c\x48\x51\xa1\xb2\xc8\xa1\x53\x1c\x0d\xb8\x1d\xc2\xbb\x96\x55\x3b\x84\xb7\xe5\xeb\xe1\x14\x6a\xdd\x29\x9e\x0b\x45\xe7\x1f\x6f\x2e\xaf\x3f\xdd\x5e\x43\x2d\x24\x42\xdc\x33\x5a\x3b\xe0\xc2\x60\xe5\xb4\x79\x04\x5d\x83\x4b\x8c\x39\x83\x58\xe6\x27\xeb\xc3\x21\xcf\xfb\x1e\x38\xd6\x42\x21\x14\x0d\x3a\x56\x40\xd8\x3c\x83\x07\xe1\x76\x80\x3f\x1c\x2a\x0e\x0b\x28\x3e\xb3\xea\x1b\xdb\x62\x01\x8b\x32\xfe\x85\xb3\xc3\x21\xcf\xfa\x1e\x1c\x36\xad\x64\x0e\xa1\xd8\x21\xe3\x68\x0a\x28\x3d\x4a\xdf\x83\xd7\x8d\x46\x26\x21\xd1\xb4\xda\xb8\x02\x16\x74\x54\x69\x65\x1d\x2c\xf3\x6c\xbd\x86\x8f\x6c\x83\x12\x76\x5a\x72\x4b\x51\x58\x67\x84\xda\x82\xa4\x6d\x8e\x4a\x3b\xbf\xf4\x27\x7d\x0f\x52\x3f\xa0\x81\x45\xf9\x89\x35\x08\x87\x03\xb8\xc7\x76\x0c\x9f\x33\xc7\x36\xcc\x62\x99\x67\x01\xf3\x02\x8a\xbe\x87\x45\x19\x56\x87\x43\x41\xf6\x68\xeb\xe6\xaa\xbc\xf4\x3e\x30\xe5\x3c\xcc\x33\xeb\x33\xbb\x82\x43\x2d\x50\xf2\x23\x86\x8e\x81\x0d\x66\x6f\xae\xca\x5b\xa7\x0d\xdb\xe2\x1f\xf8\x18\xcc\xfb\x14\x1b\xa6\xb6\x08\x8b\x1a\xce\x2f\x60\x51\xbe\xf7\xc0\xd6\x67\xd5\xeb\x04\x33\xfe\xa0\x9e\x20\x29\xe3\x83\xe7\x41\xe2\x3f\x5d\x9e\x52\x55\x8f\xb9\xda\xa3\x71\xf8\x03\x5a\xa3\x5b\x34\xee\xf1\x48\x34\xd9\xcc\x42\x8c\xa3\x3e\x1a\xc5\x70\xc9\x5e\x25\x46\x84\x21\xa2\x6b\xbe\x45\x0b\xe4\xb3\x17\x5c\x20\xdf\x86\x13\x4c\xb3\x34\x45\x44\xe7\x3f\x11\x10\x8e\x01\x91\xa6\xf2\x0b\xa1\xa0\xe9\x1c\x73\x42\x2b\x3b\xc4\x31\xe0\xc6\x30\x46\xb5\x23\x01\x2c\x5c\xd3\x4a\xef\x63\x6b\x84\x72\x35\x14\x5c\x30\x89\x95\x5b\xbf\xb2\x6b\xdf\x1f\xeb\x2a\x3a\x6e\x7d\x27\xc4\x74\x40\x6c\x84\x1f\x63\x91\x07\x18\xaa\xf0\x15\x95\x7f\xd8\x78\x19\x76\xcf\x8c\x60\x1b\x89\x4f\x61\xfb\x1e\x44\x0d\x3b\x66\xef\xe6\xd0\xff\x66\x71\xde\x78\xa2\x06\xed\xfb\xe4\x03\xb3\x57\x58\xb3\x4e\xba\xb0\xf8\xc2\xa4\xe0\xcc\x69\x63\x7d\x13\x75\xcd\x07\xad\xbf\xd9\x70\xf4\x59\x4b\x51\xf9\x1b\xce\x01\x00\xe8\xea\xd4\x20\x40\x17\x3b\x8a\x27\x22\xa2\x3e\xa6\xfc\x1c\xe0\x02\x18\xe7\xc9\xfa\x4d\x0a\x12\xfd\xce\x06\x40\x95\x18\xa2\x32\xf9\xa4\x1d\x82\xdb\x31\x47\xa5\x30\x66\x0d\x36\x28\xf5\x03\x30\xe3\x0b\x40\x38\xc1\xa4\xf8\x1b\x39\x6c\x1e\x03\x1b\x76\xca\x89\x06\x03\x42\x1b\xd9\x4b\x87\x9a\x1f\xc5\xa9\x64\x02\x53\x22\xb0\xb6\x95\xa2\xa2\xad\x12\xee\x76\x68\xb0\xd6\x06\x4f\x03\x82\x70\x60\x77\xba\x93\x1c\x36\x08\x81\xcd\x70\x64\x84\x86\x09\x05\xcc\x42\xad\xa5\xd4\x0f\xf6\x9c\x54\xe8\x27\x0b\xa2\xf0\x35\x92\xc2\xa5\x56\xb5\xd8\x8e\x6c\x7a\x38\xac\xa3\x9f\x45\xd4\x49\x13\xb2\x67\xc6\x93\xe4\x0b\x89\xc9\xc2\xff\x3f\x3d\x6e\x72\xf2\x17\x2a\x57\xfa\x45\x54\x1c\xc0\xb2\xe3\xf7\x95\x65\x59\x5c\x78\xbd\xf0\xf7\x98\x66\xe0\x05\x3b\x63\x2d\x22\x2d\x82\xbc\xb9\x2a\xef\x2d\x9a\x2b\x7a\x54\x38\x24\x6c\x46\x77\xdf\xb6\xf4\xa0\xc4\x0d\x2f\x1e\x44\x66\x16\x66\xc4\x58\x0f\x16\xbc\x83\xd1\x73\x46\x18\xe5\x50\xd0\x4b\xa5\x9d\x5f\xdf\xd8\x6b\xd5\x35\xab\x28\x1b\x9c\xe5\x51\x26\x50\x69\xd4\x88\x04\x40\x52\x91\x7c\x06\xb9\x19\xff\x0c\x9b\x7b\x26\x3b\x2a\x99\xca\x60\x28\x94\x5a\x9b\x81\x8d\x12\x62\x25\x5f\xcb\x68\x7c\x86\x39\x75\xa2\x77\xf3\x4e\x34\x18\xfe\xdd\xdf\x53\x06\xea\x4e\x55\xcb\x15\x8c\x89\x08\xb0\x77\xfe\x4d\x9b\x02\x1f\x73\x34\x5e\x60\x5d\xde\xb7\x9c\x39\xbc\x1a\x0d\xbd\x14\xf8\x4c\xee\x97\xc3\xef\x08\xe5\x17\x83\x9f\x22\xff\xa5\x78\x69\x20\x59\xd4\x65\x42\x5c\x69\xb8\xc4\xfe\x21\xd6\x51\x62\x26\x40\x03\xc2\xf9\x05\x8c\x1c\xec\x7d\x80\xe5\x2b\xbb\x02\x34\x46\x9b\xe2\x89\x07\x43\x66\x54\x0c\x4f\x58\x60\x3e\x13\x11\x7a\xc8\x41\x31\x4b\x42\x11\xb3\x00\x37\xce\x2b\x54\x4c\xca\x89\x87\x36\x9d\x90\x1c\x8d\x67\x2b\x4f\x27\x60\xd9\x1e\xa7\x7c\x0d\x76\xe8\xb5\x78\x21\x11\xe9\x62\x35\x27\xfa\xf5\xc9\x30\xc8\x55\x9d\x75\xba\x09\x03\x91\xf7\x12\x55\xd7\x40\xec\x22\x1a\xfa\xa6\x87\xfa\xd9\xe8\x41\xaf\xca\x70\x57\xbe\x99\x06\xbb\xeb\x13\xd0\x8d\x08\xb4\x3b\x50\x28\x79\x5c\x1b\x6f\x6b\x87\x64\xaf\x0c\x06\xe2\xb3\xeb\xd5\xcf\x2f\xc0\x19\xd1\x0c\x2c\x17\x53\x5c\xde\x86\x87\x7d\x91\xd0\x5f\x32\x07\x04\xbb\x31\x1e\x3b\xa2\xbf\x50\x77\x53\x7c\x3e\x99\x24\x98\xa2\x84\x19\x22\xcf\xd3\xae\x99\xf7\x8b\xdf\x5f\x9f\x00\xd4\x42\x71\xc2\x27\x55\x7a\x65\x5e\xe8\x05\x1f\x67\x9c\xc6\x52\xc2\xfa\x7a\x3a\xcc\x3e\x75\xe9\x93\x37\xab\x50\x51\x03\x7e\xf7\xe7\x93\xfd\x2f\xd4\x57\x51\xe6\x59\x19\x7b\x04\x8a\x71\x31\xc9\x3c\xaf\xc9\xd4\xb7\x24\xec\x50\x57\x59\x18\xaf\x43\xbe\xe6\xcd\x0f\x17\x29\xd2\xe8\xe5\xbc\xe7\x8e\x15\xde\xf3\x7b\xa2\x94\xd0\xb4\x35\x4e\xf3\xff\x37\x2d\xcf\xe3\x9c\x21\x0f\x13\x5b\x18\xd6\x02\xe8\xe4\xd4\xca\xfb\x12\xba\xd8\xa6\x6a\x2b\x08\xe5\xb5\x5c\x0d\x03\x64\xef\x95\x0d\xba\xce\xa8\xb8\xb5\xb4\xab\x3c\xcb\x0e\x79\x9e\x34\xdf\x53\xf6\x38\x1b\x4b\x99\x99\xad\x3f\x35\x58\xa1\xd8\x87\x59\xfa\xf7\xd0\xcc\xef\xe3\x8c\x9c\xff\x14\x5f\x78\xbc\x91\x2c\x42\xb9\xc5\x24\xfe\x14\x71\x50\xec\x89\xcd\xe5\x84\x3d\xcf\x07\x11\x5c\xc8\x82\x7d\x10\xae\xda\x41\x2a\x49\x77\x51\x31\x4b\x7d\x13\xef\x4c\x1c\xb9\xb3\x40\x0d\xca\x9f\xc2\x6b\x38\x1c\x4e\x9f\xd0\xf7\xad\x33\x5d\xe5\x86\x8c\xf4\x3d\xb4\xcc\x56\x4c\x86\xfb\x1b\x65\xcf\x43\x65\xc6\xdb\x50\x42\xd2\x3a\x96\xf0\xfc\xb0\x6e\x5c\x79\xed\x5d\xaf\x97\x61\x66\x9a\xd8\xe2\x1c\x84\xa2\xe4\x26\xd9\xa3\x1c\x1f\x79\x93\xce\xe1\xd5\xf7\xe2\x34\x09\xd9\x5f\x7d\x76\xa0\xfb\xcf\x26\x12\x7d\xe9\x83\x95\x06\x74\xc6\xb9\xf0\x0f\x3f\x93\xc3\x97\xeb\x53\xf6\x7d\x37\xa9\x10\x75\x54\x4c\xf9\x01\x51\xef\xd1\x18\xc1\xc3\x84\xa8\x0d\x7d\xd5\x6b\x9a\x81\x27\xc8\xf0\xf9\x3f\x54\x08\x31\x58\xe4\xd8\x72\x64\xec\xf4\x2b\x7d\xe6\x4d\x3a\x3e\xfd\x13\x00\x00\xff\xff\x9f\x55\xe0\x31\x92\x10\x00\x00") +var _templateMetaTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x57\xcd\x6e\xdb\x38\x10\x3e\x4b\x4f\x31\x10\x5c\xc0\x0e\x12\xb9\xed\x6d\x03\xe4\xd0\x4d\x52\x34\xd8\xa2\x28\x90\xa4\x97\xc5\xa2\xa0\xc5\x91\x4d\x94\x22\x5d\x92\x4a\x9a\x15\xf4\xee\x0b\x0e\x49\xfd\x24\xf6\xee\xb6\x17\xc3\x24\x67\xbe\xf9\xe1\xcc\xc7\x51\xd7\xad\x4f\xf2\x4b\xbd\x7f\x32\x62\xbb\x73\xf0\xf6\xf5\x9b\xdf\xce\xf6\x06\x2d\x2a\x07\xef\x59\x85\x1b\xad\xbf\xc1\x8d\xaa\x4a\x78\x27\x25\x90\x90\x05\x7f\x6e\x1e\x90\x97\xf9\xdd\x4e\x58\xb0\xba\x35\x15\x42\xa5\x39\x82\xb0\x20\x45\x85\xca\x22\x87\x56\x71\x34\xe0\x76\x08\xef\xf6\xac\xda\x21\xbc\x2d\x5f\xa7\x53\xa8\x75\xab\x78\x2e\x14\x9d\x7f\xbc\xb9\xbc\xfe\x74\x7b\x0d\xb5\x90\x08\x71\xcf\x68\xed\x80\x0b\x83\x95\xd3\xe6\x09\x74\x0d\x6e\x62\xcc\x19\xc4\x32\x3f\x59\xf7\x7d\x9e\x77\x1d\x70\xac\x85\x42\x28\x1a\x74\xac\x80\xb0\x79\x06\x8f\xc2\xed\x00\x7f\x38\x54\x1c\x16\x50\x7c\x66\xd5\x37\xb6\xc5\x02\x16\x65\xfc\x0b\x67\x7d\x9f\x67\x5d\x07\x0e\x9b\xbd\x64\x0e\xa1\xd8\x21\xe3\x68\x0a\x28\x3d\x4a\xd7\x81\xd7\x8d\x46\x46\x21\xd1\xec\xb5\x71\x05\x2c\xe8\xa8\xd2\xca\x3a\x58\xe6\xd9\x7a\x0d\x1f\xd9\x06\x25\xec\xb4\xe4\x96\xa2\xb0\xce\x08\xb5\x05\x49\xdb\x1c\x95\x76\x7e\xe9\x4f\xba\x0e\xa4\x7e\x44\x03\x8b\xf2\x13\x6b\x10\xfa\x1e\xdc\xd3\x7e\x08\x9f\x33\xc7\x36\xcc\x62\x99\x67\x01\xf3\x02\x8a\xae\x83\x45\x19\x56\x7d\x5f\x90\x3d\xda\xba\xb9\x2a\x2f\xbd\x0f\x4c\x39\x0f\xf3\xc2\xfa\xcc\xae\xe0\x50\x0b\x94\xfc\x80\xa1\x43\x60\xc9\xec\xcd\x55\x79\xeb\xb4\x61\x5b\xfc\x03\x9f\x82\x79\x9f\x62\xc3\xd4\x16\x61\x51\xc3\xf9\x05\x2c\xca\xf7\x1e\xd8\xfa\xa4\x64\x74\xba\x08\x96\xfc\x59\x3d\x45\xcd\xb3\xe4\x7b\x10\xf8\x4f\xa7\xc7\x64\xd5\x43\xb6\x8e\x45\x91\xcd\x70\xa3\xff\xf5\x41\xef\xd3\xe5\x7a\x95\x18\x09\x86\x48\xae\xf9\x16\xa7\x81\x20\xdf\x86\x13\x3c\x1c\x07\x9d\xff\x44\x18\x38\x84\x41\x9a\xca\x2f\x84\x82\xa6\x75\xcc\x09\xad\x6c\x8a\x23\xe1\xc6\x30\x06\xb5\x03\x01\x2c\x5c\xb3\x97\xde\xc7\xbd\x11\xca\xd5\x50\x70\xc1\x24\x56\x6e\xfd\xca\xae\x7d\x5f\xac\xab\xe8\xb8\xf5\x1d\x10\xd3\x01\xb1\x01\x7e\x0c\xc5\x1d\x60\xa8\xb2\x57\x54\xf6\x61\xe3\x38\xec\x03\x33\x82\x6d\x24\x3e\x87\xed\x3a\x10\x35\xec\x98\xbd\x9b\x43\xff\x9b\xc5\x79\xc3\x89\x1a\xb4\xef\x8f\x0f\xcc\x5e\x61\xcd\x5a\xe9\xc2\xe2\x0b\x93\x82\x33\xa7\x8d\xf5\xcd\xd3\x36\x1f\xb4\xfe\x66\xc3\xd1\x67\x2d\x45\xe5\x6f\x38\x07\x00\xa0\xab\x53\x49\x80\x2e\x76\x10\x9f\x88\x88\xfa\x90\xf2\x4b\x80\x0b\x60\x9c\x4f\xd6\x6f\xa6\x20\xd1\xef\x2c\x01\xaa\x89\x21\x2a\x93\x4f\xda\x21\xb8\x1d\x73\x54\x0a\x43\xd6\x60\x83\x52\x3f\x02\x33\xbe\x00\x84\x13\x4c\x8a\xbf\x91\xc3\xe6\x29\xb0\x60\xab\x9c\x68\x30\x20\xec\x23\x6b\xe9\x50\xf3\x83\x38\x95\x4c\x60\x48\x04\xb6\xdf\x4b\x51\xd1\x56\x09\x77\x3b\x34\x58\x6b\x83\xa7\x01\x41\x38\xb0\x3b\xdd\x4a\x0e\x1b\x84\xc0\x62\x38\xf4\x50\xc3\x84\x02\x66\xa1\xd6\x52\xea\x47\x7b\x4e\x2a\xf4\x93\x05\x51\xf8\x1a\xc9\xe0\x52\xab\x5a\x6c\x07\x16\xed\xfb\x75\xf4\xb3\x88\x3a\xd3\x84\x3c\x30\xe3\xc9\xf1\x48\x62\xb2\xf0\xff\x4f\x8f\x3b\x39\xf9\x0b\x95\x2b\xfd\x22\x2a\x26\xb0\xec\xf0\x7d\x65\x59\x16\x17\x5e\x2f\xfc\x3d\xa4\x19\x78\xc1\x3e\x63\xab\x50\x6a\xc4\x71\xf7\x16\xcd\x15\x3d\x26\x3c\x1c\x24\x8d\x0b\x9f\x58\x7a\x48\xe2\x86\x17\x0f\x22\x33\x0b\x33\x42\xac\x27\x7c\x98\x3c\x67\x84\x51\xa6\x82\x5e\x2a\xed\xfc\xfa\xc6\x5e\xab\xb6\x59\x45\xd9\xe0\x2c\x8f\x32\x81\x3f\xa3\x46\x24\x00\x92\x8a\xe4\x93\xe4\x66\xfc\x93\x36\x1f\x98\x6c\xa9\x64\x2a\x83\xa1\x50\x6a\x6d\x12\x1b\x3d\xa7\xd3\x32\x1a\x9f\x61\x8e\x9d\xe8\xdd\xbc\x13\x0d\x86\x7f\xf7\xf7\x94\x81\xba\x55\xd5\x72\x05\x43\x22\x02\xec\x9d\x7f\xcb\xc6\xc0\x87\x1c\x0d\x17\x58\x97\xf7\x7b\xce\x1c\x5e\x0d\x86\x8e\x05\x3e\x93\xfb\xe5\xf0\x5b\x42\xf9\xc5\xe0\xc7\xc8\x7f\x29\x5e\x1a\x44\x16\x75\x39\x21\xae\x69\xb8\xc4\xfe\x21\xd6\x41\x62\x26\x40\x83\xc1\xf9\x05\x0c\x1c\xec\x7d\x80\xe5\x2b\xbb\x02\x34\x46\x9b\xe2\x99\x07\x29\x33\x2a\x86\x27\x2c\x30\x9f\x89\x08\x9d\x72\x50\xcc\x92\x50\xc4\x2c\xc0\x8d\xf3\x0a\x15\x93\x72\xe4\xa1\x4d\x2b\x24\x47\xe3\xd9\xca\xd3\x09\x58\xf6\x80\x63\xbe\x92\x1d\x7a\x2d\x8e\x24\x62\xba\x58\xcd\x89\x7e\x7d\x92\x06\xb8\xaa\xb5\x4e\x37\x61\x10\xf2\x5e\xa2\x6a\x1b\x88\x5d\x44\xc3\xde\xf8\x50\xcf\x47\x8e\x34\xc8\xa5\xbb\xf2\xcd\x94\xec\xae\x4f\x40\x37\x22\xd0\x6e\xa2\x50\xf2\xb8\x36\xde\xd6\x0e\xc9\x5e\x19\x0c\xc4\x67\xd7\xab\x9f\x5f\x80\x33\xa2\x49\x2c\x17\x53\x5c\xde\x86\x87\x7d\x31\xa1\xbf\xc9\x1c\x10\xec\xc6\x78\xec\x80\x7e\xa4\xee\xc6\xf8\x7c\x32\x49\x70\x8a\x12\x66\x88\x3c\x9f\x76\xcd\xbc\x5f\xfc\xfe\xfa\x04\xa0\x16\x8a\x13\x3e\xa9\xd2\x2b\x73\xa4\x17\x7c\x9c\x21\x5d\x33\xc2\xfa\x7a\x9a\x66\x9f\xba\xf4\xc9\x9b\x55\xa8\xa8\x01\xbf\xfb\xf3\xd1\xfe\x17\xea\xab\x28\xf3\xa2\x8c\x3d\x02\xc5\xb8\x18\x65\x5e\xd6\xe4\xd4\xb7\x49\xd8\xa1\xae\xb2\x30\x56\x87\x7c\xcd\x9b\x1f\x2e\xa6\x48\x83\x97\xf3\x9e\x3b\x54\x78\x2f\xef\x89\x52\x42\xd3\xd6\x30\xc5\xff\xdf\xb4\xbc\x8c\x73\x86\x9c\x26\xb6\x30\xac\x05\xd0\xd1\xa9\x95\xf7\x25\x74\xb1\x9d\xaa\xad\x20\x94\xd7\x72\x95\x06\xc8\xce\x2b\x1b\x74\xad\x51\x71\x6b\x69\x57\x79\x96\xf5\x79\x3e\x69\xbe\xe7\xec\x71\x36\x94\x32\x33\x5b\x7f\x6a\xb0\x42\xf1\x10\x26\xe8\xdf\x43\x33\xbf\x8f\x33\x72\xfe\x53\x7c\xe1\xf1\x06\xb2\x08\xe5\x16\x93\xf8\x53\xc4\x41\xb1\x4f\x6c\x2e\x47\xec\x79\x3e\x88\xe0\x42\x16\xec\xa3\x70\xd5\x0e\xa6\x92\x74\x17\x15\xb3\xd4\x37\xf1\xce\xc4\x81\x3b\x0b\xd4\xa0\xfc\x29\xbc\x86\xbe\x3f\x7d\x46\xdf\xb7\xce\xb4\x95\x4b\x19\xe9\x3a\xd8\x33\x5b\x31\x19\xee\x6f\x90\x3d\x0f\x95\x19\x6f\x43\x09\x49\xeb\x58\xc2\xf3\xc3\xba\x71\xe5\xb5\x77\xbd\x5e\x86\x99\x69\x64\x8b\x73\x10\x8a\x92\x3b\xc9\x1e\xe5\xf8\xc0\x9b\x74\x0e\xaf\xbe\x17\xa7\x93\x90\xfd\xd5\x67\x3d\xdd\x7f\x36\x92\xe8\xb1\x0f\x55\x1a\xd0\x19\xe7\xc2\x3f\xfc\x4c\xa6\x2f\xd6\xe7\xec\xfb\x6e\x54\x21\xea\xa8\x98\xf2\x03\xa2\x7e\x40\x63\x04\x0f\x13\xa2\x36\xf4\x35\xaf\x69\x06\x1e\x21\xc3\x67\x7f\xaa\x10\x62\xb0\xc8\xb1\xe5\xc0\xd8\xd3\xaf\xf3\x99\x37\xd3\xf1\xe9\x9f\x00\x00\x00\xff\xff\x14\xc8\x51\xcc\x8a\x10\x00\x00") func templateMetaTmplBytes() ([]byte, error) { return bindataRead( @@ -981,7 +981,7 @@ func templateMetaTmpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "template/meta.tmpl", size: 4242, mode: os.FileMode(420), modTime: time.Unix(1, 0)} + info := bindataFileInfo{name: "template/meta.tmpl", size: 4234, mode: os.FileMode(420), modTime: time.Unix(1, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/entc/gen/template/meta.tmpl b/entc/gen/template/meta.tmpl index b388a0a67..cfc29acef 100644 --- a/entc/gen/template/meta.tmpl +++ b/entc/gen/template/meta.tmpl @@ -17,8 +17,9 @@ const ( Label = "{{ $.Label }}" // {{ $.ID.Constant }} holds the string denoting the id field in the database. {{ $.ID.Constant }} = "{{ $.ID.StorageKey }}" - {{- range $f := $.Fields -}}{{ $field := $f.Constant -}} - // {{ $field }} holds the string denoting the {{ lower $f.Name }} vertex property in the database. + {{- range $f := $.Fields }} + {{- $field := $f.Constant }} + // {{ $field }} holds the string denoting the {{ lower $f.Name }} field in the database. {{ $field }} = "{{ $f.StorageKey }}" {{- end }} diff --git a/entc/integration/customid/ent/blob/blob.go b/entc/integration/customid/ent/blob/blob.go index 7b196975d..af7f49b9e 100644 --- a/entc/integration/customid/ent/blob/blob.go +++ b/entc/integration/customid/ent/blob/blob.go @@ -14,7 +14,8 @@ const ( // Label holds the string label denoting the blob type in the database. Label = "blob" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldUUID holds the string denoting the uuid vertex property in the database. + FieldID = "id" + // FieldUUID holds the string denoting the uuid field in the database. FieldUUID = "uuid" // EdgeParent holds the string denoting the parent edge name in mutations. diff --git a/entc/integration/customid/ent/car/car.go b/entc/integration/customid/ent/car/car.go index 48bb8bd86..5a590ddc4 100644 --- a/entc/integration/customid/ent/car/car.go +++ b/entc/integration/customid/ent/car/car.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the car type in the database. Label = "car" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldModel holds the string denoting the model vertex property in the database. + FieldID = "id" + // FieldModel holds the string denoting the model field in the database. FieldModel = "model" // EdgeOwner holds the string denoting the owner edge name in mutations. diff --git a/entc/integration/ent/card/card.go b/entc/integration/ent/card/card.go index e9f7df58b..ea752b7d8 100644 --- a/entc/integration/ent/card/card.go +++ b/entc/integration/ent/card/card.go @@ -14,11 +14,15 @@ const ( // Label holds the string label denoting the card type in the database. Label = "card" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldCreateTime holds the string denoting the create_time vertex property in the database. - FieldCreateTime = "create_time" // FieldUpdateTime holds the string denoting the update_time vertex property in the database. - FieldUpdateTime = "update_time" // FieldNumber holds the string denoting the number vertex property in the database. - FieldNumber = "number" // FieldName holds the string denoting the name vertex property in the database. - FieldName = "name" + FieldID = "id" + // FieldCreateTime holds the string denoting the create_time field in the database. + FieldCreateTime = "create_time" + // FieldUpdateTime holds the string denoting the update_time field in the database. + FieldUpdateTime = "update_time" + // FieldNumber holds the string denoting the number field in the database. + FieldNumber = "number" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" // EdgeOwner holds the string denoting the owner edge name in mutations. EdgeOwner = "owner" diff --git a/entc/integration/ent/comment/comment.go b/entc/integration/ent/comment/comment.go index 66b972b48..a478e5cea 100644 --- a/entc/integration/ent/comment/comment.go +++ b/entc/integration/ent/comment/comment.go @@ -10,9 +10,12 @@ const ( // Label holds the string label denoting the comment type in the database. Label = "comment" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldUniqueInt holds the string denoting the unique_int vertex property in the database. - FieldUniqueInt = "unique_int" // FieldUniqueFloat holds the string denoting the unique_float vertex property in the database. - FieldUniqueFloat = "unique_float" // FieldNillableInt holds the string denoting the nillable_int vertex property in the database. + FieldID = "id" + // FieldUniqueInt holds the string denoting the unique_int field in the database. + FieldUniqueInt = "unique_int" + // FieldUniqueFloat holds the string denoting the unique_float field in the database. + FieldUniqueFloat = "unique_float" + // FieldNillableInt holds the string denoting the nillable_int field in the database. FieldNillableInt = "nillable_int" // Table holds the table name of the comment in the database. diff --git a/entc/integration/ent/fieldtype/fieldtype.go b/entc/integration/ent/fieldtype/fieldtype.go index 2f76ff077..3c34ac138 100644 --- a/entc/integration/ent/fieldtype/fieldtype.go +++ b/entc/integration/ent/fieldtype/fieldtype.go @@ -14,39 +14,71 @@ const ( // Label holds the string label denoting the fieldtype type in the database. Label = "field_type" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldInt holds the string denoting the int vertex property in the database. - FieldInt = "int" // FieldInt8 holds the string denoting the int8 vertex property in the database. - FieldInt8 = "int8" // FieldInt16 holds the string denoting the int16 vertex property in the database. - FieldInt16 = "int16" // FieldInt32 holds the string denoting the int32 vertex property in the database. - FieldInt32 = "int32" // FieldInt64 holds the string denoting the int64 vertex property in the database. - FieldInt64 = "int64" // FieldOptionalInt holds the string denoting the optional_int vertex property in the database. - FieldOptionalInt = "optional_int" // FieldOptionalInt8 holds the string denoting the optional_int8 vertex property in the database. - FieldOptionalInt8 = "optional_int8" // FieldOptionalInt16 holds the string denoting the optional_int16 vertex property in the database. - FieldOptionalInt16 = "optional_int16" // FieldOptionalInt32 holds the string denoting the optional_int32 vertex property in the database. - FieldOptionalInt32 = "optional_int32" // FieldOptionalInt64 holds the string denoting the optional_int64 vertex property in the database. - FieldOptionalInt64 = "optional_int64" // FieldNillableInt holds the string denoting the nillable_int vertex property in the database. - FieldNillableInt = "nillable_int" // FieldNillableInt8 holds the string denoting the nillable_int8 vertex property in the database. - FieldNillableInt8 = "nillable_int8" // FieldNillableInt16 holds the string denoting the nillable_int16 vertex property in the database. - FieldNillableInt16 = "nillable_int16" // FieldNillableInt32 holds the string denoting the nillable_int32 vertex property in the database. - FieldNillableInt32 = "nillable_int32" // FieldNillableInt64 holds the string denoting the nillable_int64 vertex property in the database. - FieldNillableInt64 = "nillable_int64" // FieldValidateOptionalInt32 holds the string denoting the validate_optional_int32 vertex property in the database. - FieldValidateOptionalInt32 = "validate_optional_int32" // FieldOptionalUint holds the string denoting the optional_uint vertex property in the database. - FieldOptionalUint = "optional_uint" // FieldOptionalUint8 holds the string denoting the optional_uint8 vertex property in the database. - FieldOptionalUint8 = "optional_uint8" // FieldOptionalUint16 holds the string denoting the optional_uint16 vertex property in the database. - FieldOptionalUint16 = "optional_uint16" // FieldOptionalUint32 holds the string denoting the optional_uint32 vertex property in the database. - FieldOptionalUint32 = "optional_uint32" // FieldOptionalUint64 holds the string denoting the optional_uint64 vertex property in the database. - FieldOptionalUint64 = "optional_uint64" // FieldState holds the string denoting the state vertex property in the database. - FieldState = "state" // FieldOptionalFloat holds the string denoting the optional_float vertex property in the database. - FieldOptionalFloat = "optional_float" // FieldOptionalFloat32 holds the string denoting the optional_float32 vertex property in the database. - FieldOptionalFloat32 = "optional_float32" // FieldDatetime holds the string denoting the datetime vertex property in the database. - FieldDatetime = "datetime" // FieldDecimal holds the string denoting the decimal vertex property in the database. - FieldDecimal = "decimal" // FieldDir holds the string denoting the dir vertex property in the database. - FieldDir = "dir" // FieldNdir holds the string denoting the ndir vertex property in the database. - FieldNdir = "ndir" // FieldStr holds the string denoting the str vertex property in the database. - FieldStr = "str" // FieldNullStr holds the string denoting the null_str vertex property in the database. - FieldNullStr = "null_str" // FieldLink holds the string denoting the link vertex property in the database. - FieldLink = "link" // FieldNullLink holds the string denoting the null_link vertex property in the database. - FieldNullLink = "null_link" + FieldID = "id" + // FieldInt holds the string denoting the int field in the database. + FieldInt = "int" + // FieldInt8 holds the string denoting the int8 field in the database. + FieldInt8 = "int8" + // FieldInt16 holds the string denoting the int16 field in the database. + FieldInt16 = "int16" + // FieldInt32 holds the string denoting the int32 field in the database. + FieldInt32 = "int32" + // FieldInt64 holds the string denoting the int64 field in the database. + FieldInt64 = "int64" + // FieldOptionalInt holds the string denoting the optional_int field in the database. + FieldOptionalInt = "optional_int" + // FieldOptionalInt8 holds the string denoting the optional_int8 field in the database. + FieldOptionalInt8 = "optional_int8" + // FieldOptionalInt16 holds the string denoting the optional_int16 field in the database. + FieldOptionalInt16 = "optional_int16" + // FieldOptionalInt32 holds the string denoting the optional_int32 field in the database. + FieldOptionalInt32 = "optional_int32" + // FieldOptionalInt64 holds the string denoting the optional_int64 field in the database. + FieldOptionalInt64 = "optional_int64" + // FieldNillableInt holds the string denoting the nillable_int field in the database. + FieldNillableInt = "nillable_int" + // FieldNillableInt8 holds the string denoting the nillable_int8 field in the database. + FieldNillableInt8 = "nillable_int8" + // FieldNillableInt16 holds the string denoting the nillable_int16 field in the database. + FieldNillableInt16 = "nillable_int16" + // FieldNillableInt32 holds the string denoting the nillable_int32 field in the database. + FieldNillableInt32 = "nillable_int32" + // FieldNillableInt64 holds the string denoting the nillable_int64 field in the database. + FieldNillableInt64 = "nillable_int64" + // FieldValidateOptionalInt32 holds the string denoting the validate_optional_int32 field in the database. + FieldValidateOptionalInt32 = "validate_optional_int32" + // FieldOptionalUint holds the string denoting the optional_uint field in the database. + FieldOptionalUint = "optional_uint" + // FieldOptionalUint8 holds the string denoting the optional_uint8 field in the database. + FieldOptionalUint8 = "optional_uint8" + // FieldOptionalUint16 holds the string denoting the optional_uint16 field in the database. + FieldOptionalUint16 = "optional_uint16" + // FieldOptionalUint32 holds the string denoting the optional_uint32 field in the database. + FieldOptionalUint32 = "optional_uint32" + // FieldOptionalUint64 holds the string denoting the optional_uint64 field in the database. + FieldOptionalUint64 = "optional_uint64" + // FieldState holds the string denoting the state field in the database. + FieldState = "state" + // FieldOptionalFloat holds the string denoting the optional_float field in the database. + FieldOptionalFloat = "optional_float" + // FieldOptionalFloat32 holds the string denoting the optional_float32 field in the database. + FieldOptionalFloat32 = "optional_float32" + // FieldDatetime holds the string denoting the datetime field in the database. + FieldDatetime = "datetime" + // FieldDecimal holds the string denoting the decimal field in the database. + FieldDecimal = "decimal" + // FieldDir holds the string denoting the dir field in the database. + FieldDir = "dir" + // FieldNdir holds the string denoting the ndir field in the database. + FieldNdir = "ndir" + // FieldStr holds the string denoting the str field in the database. + FieldStr = "str" + // FieldNullStr holds the string denoting the null_str field in the database. + FieldNullStr = "null_str" + // FieldLink holds the string denoting the link field in the database. + FieldLink = "link" + // FieldNullLink holds the string denoting the null_link field in the database. + FieldNullLink = "null_link" // Table holds the table name of the fieldtype in the database. Table = "field_types" diff --git a/entc/integration/ent/file/file.go b/entc/integration/ent/file/file.go index 9f1127bcd..920639293 100644 --- a/entc/integration/ent/file/file.go +++ b/entc/integration/ent/file/file.go @@ -10,10 +10,14 @@ const ( // Label holds the string label denoting the file type in the database. Label = "file" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldSize holds the string denoting the size vertex property in the database. - FieldSize = "fsize" // FieldName holds the string denoting the name vertex property in the database. - FieldName = "name" // FieldUser holds the string denoting the user vertex property in the database. - FieldUser = "user" // FieldGroup holds the string denoting the group vertex property in the database. + FieldID = "id" + // FieldSize holds the string denoting the size field in the database. + FieldSize = "fsize" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" + // FieldUser holds the string denoting the user field in the database. + FieldUser = "user" + // FieldGroup holds the string denoting the group field in the database. FieldGroup = "group" // EdgeOwner holds the string denoting the owner edge name in mutations. diff --git a/entc/integration/ent/filetype/filetype.go b/entc/integration/ent/filetype/filetype.go index 7961e4395..0de5818c3 100644 --- a/entc/integration/ent/filetype/filetype.go +++ b/entc/integration/ent/filetype/filetype.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the filetype type in the database. Label = "file_type" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeFiles holds the string denoting the files edge name in mutations. diff --git a/entc/integration/ent/group/group.go b/entc/integration/ent/group/group.go index 84a6e175f..0bfaf303e 100644 --- a/entc/integration/ent/group/group.go +++ b/entc/integration/ent/group/group.go @@ -10,12 +10,17 @@ const ( // Label holds the string label denoting the group type in the database. Label = "group" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldActive holds the string denoting the active vertex property in the database. - FieldActive = "active" // FieldExpire holds the string denoting the expire vertex property in the database. - FieldExpire = "expire" // FieldType holds the string denoting the type vertex property in the database. - FieldType = "type" // FieldMaxUsers holds the string denoting the max_users vertex property in the database. - FieldMaxUsers = "max_users" // FieldName holds the string denoting the name vertex property in the database. - FieldName = "name" + FieldID = "id" + // FieldActive holds the string denoting the active field in the database. + FieldActive = "active" + // FieldExpire holds the string denoting the expire field in the database. + FieldExpire = "expire" + // FieldType holds the string denoting the type field in the database. + FieldType = "type" + // FieldMaxUsers holds the string denoting the max_users field in the database. + FieldMaxUsers = "max_users" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" // EdgeFiles holds the string denoting the files edge name in mutations. EdgeFiles = "files" diff --git a/entc/integration/ent/groupinfo/groupinfo.go b/entc/integration/ent/groupinfo/groupinfo.go index 910ed6bee..e9cac2c58 100644 --- a/entc/integration/ent/groupinfo/groupinfo.go +++ b/entc/integration/ent/groupinfo/groupinfo.go @@ -10,8 +10,10 @@ const ( // Label holds the string label denoting the groupinfo type in the database. Label = "group_info" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldDesc holds the string denoting the desc vertex property in the database. - FieldDesc = "desc" // FieldMaxUsers holds the string denoting the max_users vertex property in the database. + FieldID = "id" + // FieldDesc holds the string denoting the desc field in the database. + FieldDesc = "desc" + // FieldMaxUsers holds the string denoting the max_users field in the database. FieldMaxUsers = "max_users" // EdgeGroups holds the string denoting the groups edge name in mutations. diff --git a/entc/integration/ent/node/node.go b/entc/integration/ent/node/node.go index 8e88e2e9f..9288bcb31 100644 --- a/entc/integration/ent/node/node.go +++ b/entc/integration/ent/node/node.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the node type in the database. Label = "node" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldValue holds the string denoting the value vertex property in the database. + FieldID = "id" + // FieldValue holds the string denoting the value field in the database. FieldValue = "value" // EdgePrev holds the string denoting the prev edge name in mutations. diff --git a/entc/integration/ent/pet/pet.go b/entc/integration/ent/pet/pet.go index 243153368..27103424a 100644 --- a/entc/integration/ent/pet/pet.go +++ b/entc/integration/ent/pet/pet.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the pet type in the database. Label = "pet" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeTeam holds the string denoting the team edge name in mutations. diff --git a/entc/integration/ent/user/user.go b/entc/integration/ent/user/user.go index bd854e488..0e6970030 100644 --- a/entc/integration/ent/user/user.go +++ b/entc/integration/ent/user/user.go @@ -14,16 +14,25 @@ const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldOptionalInt holds the string denoting the optional_int vertex property in the database. - FieldOptionalInt = "optional_int" // FieldAge holds the string denoting the age vertex property in the database. - FieldAge = "age" // FieldName holds the string denoting the name vertex property in the database. - FieldName = "name" // FieldLast holds the string denoting the last vertex property in the database. - FieldLast = "last" // FieldNickname holds the string denoting the nickname vertex property in the database. - FieldNickname = "nickname" // FieldPhone holds the string denoting the phone vertex property in the database. - FieldPhone = "phone" // FieldPassword holds the string denoting the password vertex property in the database. - FieldPassword = "password" // FieldRole holds the string denoting the role vertex property in the database. - FieldRole = "role" // FieldSSOCert holds the string denoting the ssocert vertex property in the database. - FieldSSOCert = "sso_cert" + FieldID = "id" + // FieldOptionalInt holds the string denoting the optional_int field in the database. + FieldOptionalInt = "optional_int" + // FieldAge holds the string denoting the age field in the database. + FieldAge = "age" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" + // FieldLast holds the string denoting the last field in the database. + FieldLast = "last" + // FieldNickname holds the string denoting the nickname field in the database. + FieldNickname = "nickname" + // FieldPhone holds the string denoting the phone field in the database. + FieldPhone = "phone" + // FieldPassword holds the string denoting the password field in the database. + FieldPassword = "password" + // FieldRole holds the string denoting the role field in the database. + FieldRole = "role" + // FieldSSOCert holds the string denoting the ssocert field in the database. + FieldSSOCert = "sso_cert" // EdgeCard holds the string denoting the card edge name in mutations. EdgeCard = "card" diff --git a/entc/integration/gremlin/ent/card/card.go b/entc/integration/gremlin/ent/card/card.go index 2da0c0ff4..fa3547cce 100644 --- a/entc/integration/gremlin/ent/card/card.go +++ b/entc/integration/gremlin/ent/card/card.go @@ -14,11 +14,15 @@ const ( // Label holds the string label denoting the card type in the database. Label = "card" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldCreateTime holds the string denoting the create_time vertex property in the database. - FieldCreateTime = "create_time" // FieldUpdateTime holds the string denoting the update_time vertex property in the database. - FieldUpdateTime = "update_time" // FieldNumber holds the string denoting the number vertex property in the database. - FieldNumber = "number" // FieldName holds the string denoting the name vertex property in the database. - FieldName = "name" + FieldID = "id" + // FieldCreateTime holds the string denoting the create_time field in the database. + FieldCreateTime = "create_time" + // FieldUpdateTime holds the string denoting the update_time field in the database. + FieldUpdateTime = "update_time" + // FieldNumber holds the string denoting the number field in the database. + FieldNumber = "number" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" // EdgeOwner holds the string denoting the owner edge name in mutations. EdgeOwner = "owner" diff --git a/entc/integration/gremlin/ent/comment/comment.go b/entc/integration/gremlin/ent/comment/comment.go index 0309e0ce3..c5f15a6d6 100644 --- a/entc/integration/gremlin/ent/comment/comment.go +++ b/entc/integration/gremlin/ent/comment/comment.go @@ -10,8 +10,11 @@ const ( // Label holds the string label denoting the comment type in the database. Label = "comment" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldUniqueInt holds the string denoting the unique_int vertex property in the database. - FieldUniqueInt = "unique_int" // FieldUniqueFloat holds the string denoting the unique_float vertex property in the database. - FieldUniqueFloat = "unique_float" // FieldNillableInt holds the string denoting the nillable_int vertex property in the database. + FieldID = "id" + // FieldUniqueInt holds the string denoting the unique_int field in the database. + FieldUniqueInt = "unique_int" + // FieldUniqueFloat holds the string denoting the unique_float field in the database. + FieldUniqueFloat = "unique_float" + // FieldNillableInt holds the string denoting the nillable_int field in the database. FieldNillableInt = "nillable_int" ) diff --git a/entc/integration/gremlin/ent/fieldtype/fieldtype.go b/entc/integration/gremlin/ent/fieldtype/fieldtype.go index 4d6a05294..6f78af5ae 100644 --- a/entc/integration/gremlin/ent/fieldtype/fieldtype.go +++ b/entc/integration/gremlin/ent/fieldtype/fieldtype.go @@ -14,39 +14,71 @@ const ( // Label holds the string label denoting the fieldtype type in the database. Label = "field_type" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldInt holds the string denoting the int vertex property in the database. - FieldInt = "int" // FieldInt8 holds the string denoting the int8 vertex property in the database. - FieldInt8 = "int8" // FieldInt16 holds the string denoting the int16 vertex property in the database. - FieldInt16 = "int16" // FieldInt32 holds the string denoting the int32 vertex property in the database. - FieldInt32 = "int32" // FieldInt64 holds the string denoting the int64 vertex property in the database. - FieldInt64 = "int64" // FieldOptionalInt holds the string denoting the optional_int vertex property in the database. - FieldOptionalInt = "optional_int" // FieldOptionalInt8 holds the string denoting the optional_int8 vertex property in the database. - FieldOptionalInt8 = "optional_int8" // FieldOptionalInt16 holds the string denoting the optional_int16 vertex property in the database. - FieldOptionalInt16 = "optional_int16" // FieldOptionalInt32 holds the string denoting the optional_int32 vertex property in the database. - FieldOptionalInt32 = "optional_int32" // FieldOptionalInt64 holds the string denoting the optional_int64 vertex property in the database. - FieldOptionalInt64 = "optional_int64" // FieldNillableInt holds the string denoting the nillable_int vertex property in the database. - FieldNillableInt = "nillable_int" // FieldNillableInt8 holds the string denoting the nillable_int8 vertex property in the database. - FieldNillableInt8 = "nillable_int8" // FieldNillableInt16 holds the string denoting the nillable_int16 vertex property in the database. - FieldNillableInt16 = "nillable_int16" // FieldNillableInt32 holds the string denoting the nillable_int32 vertex property in the database. - FieldNillableInt32 = "nillable_int32" // FieldNillableInt64 holds the string denoting the nillable_int64 vertex property in the database. - FieldNillableInt64 = "nillable_int64" // FieldValidateOptionalInt32 holds the string denoting the validate_optional_int32 vertex property in the database. - FieldValidateOptionalInt32 = "validate_optional_int32" // FieldOptionalUint holds the string denoting the optional_uint vertex property in the database. - FieldOptionalUint = "optional_uint" // FieldOptionalUint8 holds the string denoting the optional_uint8 vertex property in the database. - FieldOptionalUint8 = "optional_uint8" // FieldOptionalUint16 holds the string denoting the optional_uint16 vertex property in the database. - FieldOptionalUint16 = "optional_uint16" // FieldOptionalUint32 holds the string denoting the optional_uint32 vertex property in the database. - FieldOptionalUint32 = "optional_uint32" // FieldOptionalUint64 holds the string denoting the optional_uint64 vertex property in the database. - FieldOptionalUint64 = "optional_uint64" // FieldState holds the string denoting the state vertex property in the database. - FieldState = "state" // FieldOptionalFloat holds the string denoting the optional_float vertex property in the database. - FieldOptionalFloat = "optional_float" // FieldOptionalFloat32 holds the string denoting the optional_float32 vertex property in the database. - FieldOptionalFloat32 = "optional_float32" // FieldDatetime holds the string denoting the datetime vertex property in the database. - FieldDatetime = "datetime" // FieldDecimal holds the string denoting the decimal vertex property in the database. - FieldDecimal = "decimal" // FieldDir holds the string denoting the dir vertex property in the database. - FieldDir = "dir" // FieldNdir holds the string denoting the ndir vertex property in the database. - FieldNdir = "ndir" // FieldStr holds the string denoting the str vertex property in the database. - FieldStr = "str" // FieldNullStr holds the string denoting the null_str vertex property in the database. - FieldNullStr = "null_str" // FieldLink holds the string denoting the link vertex property in the database. - FieldLink = "link" // FieldNullLink holds the string denoting the null_link vertex property in the database. - FieldNullLink = "null_link" + FieldID = "id" + // FieldInt holds the string denoting the int field in the database. + FieldInt = "int" + // FieldInt8 holds the string denoting the int8 field in the database. + FieldInt8 = "int8" + // FieldInt16 holds the string denoting the int16 field in the database. + FieldInt16 = "int16" + // FieldInt32 holds the string denoting the int32 field in the database. + FieldInt32 = "int32" + // FieldInt64 holds the string denoting the int64 field in the database. + FieldInt64 = "int64" + // FieldOptionalInt holds the string denoting the optional_int field in the database. + FieldOptionalInt = "optional_int" + // FieldOptionalInt8 holds the string denoting the optional_int8 field in the database. + FieldOptionalInt8 = "optional_int8" + // FieldOptionalInt16 holds the string denoting the optional_int16 field in the database. + FieldOptionalInt16 = "optional_int16" + // FieldOptionalInt32 holds the string denoting the optional_int32 field in the database. + FieldOptionalInt32 = "optional_int32" + // FieldOptionalInt64 holds the string denoting the optional_int64 field in the database. + FieldOptionalInt64 = "optional_int64" + // FieldNillableInt holds the string denoting the nillable_int field in the database. + FieldNillableInt = "nillable_int" + // FieldNillableInt8 holds the string denoting the nillable_int8 field in the database. + FieldNillableInt8 = "nillable_int8" + // FieldNillableInt16 holds the string denoting the nillable_int16 field in the database. + FieldNillableInt16 = "nillable_int16" + // FieldNillableInt32 holds the string denoting the nillable_int32 field in the database. + FieldNillableInt32 = "nillable_int32" + // FieldNillableInt64 holds the string denoting the nillable_int64 field in the database. + FieldNillableInt64 = "nillable_int64" + // FieldValidateOptionalInt32 holds the string denoting the validate_optional_int32 field in the database. + FieldValidateOptionalInt32 = "validate_optional_int32" + // FieldOptionalUint holds the string denoting the optional_uint field in the database. + FieldOptionalUint = "optional_uint" + // FieldOptionalUint8 holds the string denoting the optional_uint8 field in the database. + FieldOptionalUint8 = "optional_uint8" + // FieldOptionalUint16 holds the string denoting the optional_uint16 field in the database. + FieldOptionalUint16 = "optional_uint16" + // FieldOptionalUint32 holds the string denoting the optional_uint32 field in the database. + FieldOptionalUint32 = "optional_uint32" + // FieldOptionalUint64 holds the string denoting the optional_uint64 field in the database. + FieldOptionalUint64 = "optional_uint64" + // FieldState holds the string denoting the state field in the database. + FieldState = "state" + // FieldOptionalFloat holds the string denoting the optional_float field in the database. + FieldOptionalFloat = "optional_float" + // FieldOptionalFloat32 holds the string denoting the optional_float32 field in the database. + FieldOptionalFloat32 = "optional_float32" + // FieldDatetime holds the string denoting the datetime field in the database. + FieldDatetime = "datetime" + // FieldDecimal holds the string denoting the decimal field in the database. + FieldDecimal = "decimal" + // FieldDir holds the string denoting the dir field in the database. + FieldDir = "dir" + // FieldNdir holds the string denoting the ndir field in the database. + FieldNdir = "ndir" + // FieldStr holds the string denoting the str field in the database. + FieldStr = "str" + // FieldNullStr holds the string denoting the null_str field in the database. + FieldNullStr = "null_str" + // FieldLink holds the string denoting the link field in the database. + FieldLink = "link" + // FieldNullLink holds the string denoting the null_link field in the database. + FieldNullLink = "null_link" ) var ( diff --git a/entc/integration/gremlin/ent/file/file.go b/entc/integration/gremlin/ent/file/file.go index 0d76ea17e..c1ef18cb4 100644 --- a/entc/integration/gremlin/ent/file/file.go +++ b/entc/integration/gremlin/ent/file/file.go @@ -10,10 +10,14 @@ const ( // Label holds the string label denoting the file type in the database. Label = "file" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldSize holds the string denoting the size vertex property in the database. - FieldSize = "fsize" // FieldName holds the string denoting the name vertex property in the database. - FieldName = "name" // FieldUser holds the string denoting the user vertex property in the database. - FieldUser = "user" // FieldGroup holds the string denoting the group vertex property in the database. + FieldID = "id" + // FieldSize holds the string denoting the size field in the database. + FieldSize = "fsize" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" + // FieldUser holds the string denoting the user field in the database. + FieldUser = "user" + // FieldGroup holds the string denoting the group field in the database. FieldGroup = "group" // EdgeOwner holds the string denoting the owner edge name in mutations. diff --git a/entc/integration/gremlin/ent/filetype/filetype.go b/entc/integration/gremlin/ent/filetype/filetype.go index 540f867d0..24d1ca53d 100644 --- a/entc/integration/gremlin/ent/filetype/filetype.go +++ b/entc/integration/gremlin/ent/filetype/filetype.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the filetype type in the database. Label = "file_type" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeFiles holds the string denoting the files edge name in mutations. diff --git a/entc/integration/gremlin/ent/group/group.go b/entc/integration/gremlin/ent/group/group.go index fd14276af..14ded4475 100644 --- a/entc/integration/gremlin/ent/group/group.go +++ b/entc/integration/gremlin/ent/group/group.go @@ -10,12 +10,17 @@ const ( // Label holds the string label denoting the group type in the database. Label = "group" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldActive holds the string denoting the active vertex property in the database. - FieldActive = "active" // FieldExpire holds the string denoting the expire vertex property in the database. - FieldExpire = "expire" // FieldType holds the string denoting the type vertex property in the database. - FieldType = "type" // FieldMaxUsers holds the string denoting the max_users vertex property in the database. - FieldMaxUsers = "max_users" // FieldName holds the string denoting the name vertex property in the database. - FieldName = "name" + FieldID = "id" + // FieldActive holds the string denoting the active field in the database. + FieldActive = "active" + // FieldExpire holds the string denoting the expire field in the database. + FieldExpire = "expire" + // FieldType holds the string denoting the type field in the database. + FieldType = "type" + // FieldMaxUsers holds the string denoting the max_users field in the database. + FieldMaxUsers = "max_users" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" // EdgeFiles holds the string denoting the files edge name in mutations. EdgeFiles = "files" diff --git a/entc/integration/gremlin/ent/groupinfo/groupinfo.go b/entc/integration/gremlin/ent/groupinfo/groupinfo.go index 1a5d841e7..334898f56 100644 --- a/entc/integration/gremlin/ent/groupinfo/groupinfo.go +++ b/entc/integration/gremlin/ent/groupinfo/groupinfo.go @@ -10,8 +10,10 @@ const ( // Label holds the string label denoting the groupinfo type in the database. Label = "group_info" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldDesc holds the string denoting the desc vertex property in the database. - FieldDesc = "desc" // FieldMaxUsers holds the string denoting the max_users vertex property in the database. + FieldID = "id" + // FieldDesc holds the string denoting the desc field in the database. + FieldDesc = "desc" + // FieldMaxUsers holds the string denoting the max_users field in the database. FieldMaxUsers = "max_users" // EdgeGroups holds the string denoting the groups edge name in mutations. diff --git a/entc/integration/gremlin/ent/node/node.go b/entc/integration/gremlin/ent/node/node.go index 666b7faf5..c1c9fd926 100644 --- a/entc/integration/gremlin/ent/node/node.go +++ b/entc/integration/gremlin/ent/node/node.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the node type in the database. Label = "node" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldValue holds the string denoting the value vertex property in the database. + FieldID = "id" + // FieldValue holds the string denoting the value field in the database. FieldValue = "value" // EdgePrev holds the string denoting the prev edge name in mutations. diff --git a/entc/integration/gremlin/ent/pet/pet.go b/entc/integration/gremlin/ent/pet/pet.go index 7b74e03ca..ba4176fe1 100644 --- a/entc/integration/gremlin/ent/pet/pet.go +++ b/entc/integration/gremlin/ent/pet/pet.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the pet type in the database. Label = "pet" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeTeam holds the string denoting the team edge name in mutations. diff --git a/entc/integration/gremlin/ent/user/user.go b/entc/integration/gremlin/ent/user/user.go index 9cafa15ee..47a064e25 100644 --- a/entc/integration/gremlin/ent/user/user.go +++ b/entc/integration/gremlin/ent/user/user.go @@ -14,16 +14,25 @@ const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldOptionalInt holds the string denoting the optional_int vertex property in the database. - FieldOptionalInt = "optional_int" // FieldAge holds the string denoting the age vertex property in the database. - FieldAge = "age" // FieldName holds the string denoting the name vertex property in the database. - FieldName = "name" // FieldLast holds the string denoting the last vertex property in the database. - FieldLast = "last" // FieldNickname holds the string denoting the nickname vertex property in the database. - FieldNickname = "nickname" // FieldPhone holds the string denoting the phone vertex property in the database. - FieldPhone = "phone" // FieldPassword holds the string denoting the password vertex property in the database. - FieldPassword = "password" // FieldRole holds the string denoting the role vertex property in the database. - FieldRole = "role" // FieldSSOCert holds the string denoting the ssocert vertex property in the database. - FieldSSOCert = "sso_cert" + FieldID = "id" + // FieldOptionalInt holds the string denoting the optional_int field in the database. + FieldOptionalInt = "optional_int" + // FieldAge holds the string denoting the age field in the database. + FieldAge = "age" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" + // FieldLast holds the string denoting the last field in the database. + FieldLast = "last" + // FieldNickname holds the string denoting the nickname field in the database. + FieldNickname = "nickname" + // FieldPhone holds the string denoting the phone field in the database. + FieldPhone = "phone" + // FieldPassword holds the string denoting the password field in the database. + FieldPassword = "password" + // FieldRole holds the string denoting the role field in the database. + FieldRole = "role" + // FieldSSOCert holds the string denoting the ssocert field in the database. + FieldSSOCert = "sso_cert" // EdgeCard holds the string denoting the card edge name in mutations. EdgeCard = "card" diff --git a/entc/integration/hooks/ent/card/card.go b/entc/integration/hooks/ent/card/card.go index b969c1252..e7a80cffb 100644 --- a/entc/integration/hooks/ent/card/card.go +++ b/entc/integration/hooks/ent/card/card.go @@ -16,9 +16,12 @@ const ( // Label holds the string label denoting the card type in the database. Label = "card" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldNumber holds the string denoting the number vertex property in the database. - FieldNumber = "number" // FieldName holds the string denoting the name vertex property in the database. - FieldName = "name" // FieldCreatedAt holds the string denoting the created_at vertex property in the database. + FieldID = "id" + // FieldNumber holds the string denoting the number field in the database. + FieldNumber = "number" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" + // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // EdgeOwner holds the string denoting the owner edge name in mutations. diff --git a/entc/integration/hooks/ent/user/user.go b/entc/integration/hooks/ent/user/user.go index 0a336ea9c..1dee0a226 100644 --- a/entc/integration/hooks/ent/user/user.go +++ b/entc/integration/hooks/ent/user/user.go @@ -14,9 +14,11 @@ const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldVersion holds the string denoting the version vertex property in the database. - FieldVersion = "version" // FieldName holds the string denoting the name vertex property in the database. - FieldName = "name" + FieldID = "id" + // FieldVersion holds the string denoting the version field in the database. + FieldVersion = "version" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" // EdgeCards holds the string denoting the cards edge name in mutations. EdgeCards = "cards" diff --git a/entc/integration/idtype/ent/user/user.go b/entc/integration/idtype/ent/user/user.go index 4580f2668..1110ab195 100644 --- a/entc/integration/idtype/ent/user/user.go +++ b/entc/integration/idtype/ent/user/user.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeSpouse holds the string denoting the spouse edge name in mutations. diff --git a/entc/integration/json/ent/user/user.go b/entc/integration/json/ent/user/user.go index dca70cece..f3c5f2a2b 100644 --- a/entc/integration/json/ent/user/user.go +++ b/entc/integration/json/ent/user/user.go @@ -10,12 +10,18 @@ const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldURL holds the string denoting the url vertex property in the database. - FieldURL = "url" // FieldRaw holds the string denoting the raw vertex property in the database. - FieldRaw = "raw" // FieldDirs holds the string denoting the dirs vertex property in the database. - FieldDirs = "dirs" // FieldInts holds the string denoting the ints vertex property in the database. - FieldInts = "ints" // FieldFloats holds the string denoting the floats vertex property in the database. - FieldFloats = "floats" // FieldStrings holds the string denoting the strings vertex property in the database. + FieldID = "id" + // FieldURL holds the string denoting the url field in the database. + FieldURL = "url" + // FieldRaw holds the string denoting the raw field in the database. + FieldRaw = "raw" + // FieldDirs holds the string denoting the dirs field in the database. + FieldDirs = "dirs" + // FieldInts holds the string denoting the ints field in the database. + FieldInts = "ints" + // FieldFloats holds the string denoting the floats field in the database. + FieldFloats = "floats" + // FieldStrings holds the string denoting the strings field in the database. FieldStrings = "strings" // Table holds the table name of the user in the database. diff --git a/entc/integration/migrate/entv1/user/user.go b/entc/integration/migrate/entv1/user/user.go index 06b33f1e4..e3157bd83 100644 --- a/entc/integration/migrate/entv1/user/user.go +++ b/entc/integration/migrate/entv1/user/user.go @@ -14,14 +14,21 @@ const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. - FieldID = "oid" // FieldAge holds the string denoting the age vertex property in the database. - FieldAge = "age" // FieldName holds the string denoting the name vertex property in the database. - FieldName = "name" // FieldNickname holds the string denoting the nickname vertex property in the database. - FieldNickname = "nickname" // FieldAddress holds the string denoting the address vertex property in the database. - FieldAddress = "address" // FieldRenamed holds the string denoting the renamed vertex property in the database. - FieldRenamed = "renamed" // FieldBlob holds the string denoting the blob vertex property in the database. - FieldBlob = "blob" // FieldState holds the string denoting the state vertex property in the database. - FieldState = "state" + FieldID = "oid" + // FieldAge holds the string denoting the age field in the database. + FieldAge = "age" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" + // FieldNickname holds the string denoting the nickname field in the database. + FieldNickname = "nickname" + // FieldAddress holds the string denoting the address field in the database. + FieldAddress = "address" + // FieldRenamed holds the string denoting the renamed field in the database. + FieldRenamed = "renamed" + // FieldBlob holds the string denoting the blob field in the database. + FieldBlob = "blob" + // FieldState holds the string denoting the state field in the database. + FieldState = "state" // EdgeParent holds the string denoting the parent edge name in mutations. EdgeParent = "parent" diff --git a/entc/integration/migrate/entv2/user/user.go b/entc/integration/migrate/entv2/user/user.go index d79d81d43..d3fe892da 100644 --- a/entc/integration/migrate/entv2/user/user.go +++ b/entc/integration/migrate/entv2/user/user.go @@ -14,16 +14,25 @@ const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. - FieldID = "oid" // FieldAge holds the string denoting the age vertex property in the database. - FieldAge = "age" // FieldName holds the string denoting the name vertex property in the database. - FieldName = "name" // FieldNickname holds the string denoting the nickname vertex property in the database. - FieldNickname = "nickname" // FieldPhone holds the string denoting the phone vertex property in the database. - FieldPhone = "phone" // FieldBuffer holds the string denoting the buffer vertex property in the database. - FieldBuffer = "buffer" // FieldTitle holds the string denoting the title vertex property in the database. - FieldTitle = "title" // FieldNewName holds the string denoting the new_name vertex property in the database. - FieldNewName = "renamed" // FieldBlob holds the string denoting the blob vertex property in the database. - FieldBlob = "blob" // FieldState holds the string denoting the state vertex property in the database. - FieldState = "state" + FieldID = "oid" + // FieldAge holds the string denoting the age field in the database. + FieldAge = "age" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" + // FieldNickname holds the string denoting the nickname field in the database. + FieldNickname = "nickname" + // FieldPhone holds the string denoting the phone field in the database. + FieldPhone = "phone" + // FieldBuffer holds the string denoting the buffer field in the database. + FieldBuffer = "buffer" + // FieldTitle holds the string denoting the title field in the database. + FieldTitle = "title" + // FieldNewName holds the string denoting the new_name field in the database. + FieldNewName = "renamed" + // FieldBlob holds the string denoting the blob field in the database. + FieldBlob = "blob" + // FieldState holds the string denoting the state field in the database. + FieldState = "state" // EdgeCar holds the string denoting the car edge name in mutations. EdgeCar = "car" diff --git a/entc/integration/privacy/ent/galaxy/galaxy.go b/entc/integration/privacy/ent/galaxy/galaxy.go index 042975542..2fd284e84 100644 --- a/entc/integration/privacy/ent/galaxy/galaxy.go +++ b/entc/integration/privacy/ent/galaxy/galaxy.go @@ -16,8 +16,10 @@ const ( // Label holds the string label denoting the galaxy type in the database. Label = "galaxy" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldName holds the string denoting the name vertex property in the database. - FieldName = "name" // FieldType holds the string denoting the type vertex property in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" + // FieldType holds the string denoting the type field in the database. FieldType = "type" // EdgePlanets holds the string denoting the planets edge name in mutations. diff --git a/entc/integration/privacy/ent/planet/planet.go b/entc/integration/privacy/ent/planet/planet.go index 2a2955ba2..cb26c6ab6 100644 --- a/entc/integration/privacy/ent/planet/planet.go +++ b/entc/integration/privacy/ent/planet/planet.go @@ -14,9 +14,11 @@ const ( // Label holds the string label denoting the planet type in the database. Label = "planet" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldName holds the string denoting the name vertex property in the database. - FieldName = "name" // FieldAge holds the string denoting the age vertex property in the database. - FieldAge = "age" + FieldID = "id" + // FieldName holds the string denoting the name field in the database. + FieldName = "name" + // FieldAge holds the string denoting the age field in the database. + FieldAge = "age" // EdgeNeighbors holds the string denoting the neighbors edge name in mutations. EdgeNeighbors = "neighbors" diff --git a/entc/integration/template/ent/group/group.go b/entc/integration/template/ent/group/group.go index 24bf69460..bb39e82d7 100644 --- a/entc/integration/template/ent/group/group.go +++ b/entc/integration/template/ent/group/group.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the group type in the database. Label = "group" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldMaxUsers holds the string denoting the max_users vertex property in the database. + FieldID = "id" + // FieldMaxUsers holds the string denoting the max_users field in the database. FieldMaxUsers = "max_users" // Table holds the table name of the group in the database. diff --git a/entc/integration/template/ent/pet/pet.go b/entc/integration/template/ent/pet/pet.go index 522ea11a7..8d4a6a702 100644 --- a/entc/integration/template/ent/pet/pet.go +++ b/entc/integration/template/ent/pet/pet.go @@ -10,8 +10,10 @@ const ( // Label holds the string label denoting the pet type in the database. Label = "pet" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldAge holds the string denoting the age vertex property in the database. - FieldAge = "age" // FieldLicensedAt holds the string denoting the licensed_at vertex property in the database. + FieldID = "id" + // FieldAge holds the string denoting the age field in the database. + FieldAge = "age" + // FieldLicensedAt holds the string denoting the licensed_at field in the database. FieldLicensedAt = "licensed_at" // EdgeOwner holds the string denoting the owner edge name in mutations. diff --git a/entc/integration/template/ent/user/user.go b/entc/integration/template/ent/user/user.go index 6d1865b01..a1fe07a64 100644 --- a/entc/integration/template/ent/user/user.go +++ b/entc/integration/template/ent/user/user.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgePets holds the string denoting the pets edge name in mutations. diff --git a/entc/integration/type_test.go b/entc/integration/type_test.go index 4610a55c4..8a0d1fef9 100644 --- a/entc/integration/type_test.go +++ b/entc/integration/type_test.go @@ -12,11 +12,9 @@ import ( "testing" "time" - "github.com/facebookincubator/ent/entc/integration/ent/schema" - "github.com/facebookincubator/ent/dialect/sql" - "github.com/facebookincubator/ent/entc/integration/ent" + "github.com/facebookincubator/ent/entc/integration/ent/schema" "github.com/stretchr/testify/require" ) diff --git a/examples/edgeindex/ent/city/city.go b/examples/edgeindex/ent/city/city.go index 7f7f56468..beeabab1c 100644 --- a/examples/edgeindex/ent/city/city.go +++ b/examples/edgeindex/ent/city/city.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the city type in the database. Label = "city" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeStreets holds the string denoting the streets edge name in mutations. diff --git a/examples/edgeindex/ent/street/street.go b/examples/edgeindex/ent/street/street.go index 7079d9c0a..e468a697d 100644 --- a/examples/edgeindex/ent/street/street.go +++ b/examples/edgeindex/ent/street/street.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the street type in the database. Label = "street" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeCity holds the string denoting the city edge name in mutations. diff --git a/examples/m2m2types/ent/group/group.go b/examples/m2m2types/ent/group/group.go index 6be43c55d..dd971e8de 100644 --- a/examples/m2m2types/ent/group/group.go +++ b/examples/m2m2types/ent/group/group.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the group type in the database. Label = "group" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeUsers holds the string denoting the users edge name in mutations. diff --git a/examples/m2m2types/ent/user/user.go b/examples/m2m2types/ent/user/user.go index 75c34e60b..3c92199cf 100644 --- a/examples/m2m2types/ent/user/user.go +++ b/examples/m2m2types/ent/user/user.go @@ -10,8 +10,10 @@ const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldAge holds the string denoting the age vertex property in the database. - FieldAge = "age" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldAge holds the string denoting the age field in the database. + FieldAge = "age" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeGroups holds the string denoting the groups edge name in mutations. diff --git a/examples/m2mbidi/ent/user/user.go b/examples/m2mbidi/ent/user/user.go index ff2759c74..1b83da1f9 100644 --- a/examples/m2mbidi/ent/user/user.go +++ b/examples/m2mbidi/ent/user/user.go @@ -10,8 +10,10 @@ const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldAge holds the string denoting the age vertex property in the database. - FieldAge = "age" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldAge holds the string denoting the age field in the database. + FieldAge = "age" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeFriends holds the string denoting the friends edge name in mutations. diff --git a/examples/m2mrecur/ent/user/user.go b/examples/m2mrecur/ent/user/user.go index 0e36f19a4..df5383e5b 100644 --- a/examples/m2mrecur/ent/user/user.go +++ b/examples/m2mrecur/ent/user/user.go @@ -10,8 +10,10 @@ const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldAge holds the string denoting the age vertex property in the database. - FieldAge = "age" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldAge holds the string denoting the age field in the database. + FieldAge = "age" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeFollowers holds the string denoting the followers edge name in mutations. diff --git a/examples/o2m2types/ent/pet/pet.go b/examples/o2m2types/ent/pet/pet.go index 01d185ccb..98744b569 100644 --- a/examples/o2m2types/ent/pet/pet.go +++ b/examples/o2m2types/ent/pet/pet.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the pet type in the database. Label = "pet" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeOwner holds the string denoting the owner edge name in mutations. diff --git a/examples/o2m2types/ent/user/user.go b/examples/o2m2types/ent/user/user.go index c522b679e..2cc8f36a2 100644 --- a/examples/o2m2types/ent/user/user.go +++ b/examples/o2m2types/ent/user/user.go @@ -10,8 +10,10 @@ const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldAge holds the string denoting the age vertex property in the database. - FieldAge = "age" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldAge holds the string denoting the age field in the database. + FieldAge = "age" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgePets holds the string denoting the pets edge name in mutations. diff --git a/examples/o2mrecur/ent/node/node.go b/examples/o2mrecur/ent/node/node.go index 877936835..ed45fd135 100644 --- a/examples/o2mrecur/ent/node/node.go +++ b/examples/o2mrecur/ent/node/node.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the node type in the database. Label = "node" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldValue holds the string denoting the value vertex property in the database. + FieldID = "id" + // FieldValue holds the string denoting the value field in the database. FieldValue = "value" // EdgeParent holds the string denoting the parent edge name in mutations. diff --git a/examples/o2o2types/ent/card/card.go b/examples/o2o2types/ent/card/card.go index d63f0951c..4927e0eb3 100644 --- a/examples/o2o2types/ent/card/card.go +++ b/examples/o2o2types/ent/card/card.go @@ -10,9 +10,11 @@ const ( // Label holds the string label denoting the card type in the database. Label = "card" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldExpired holds the string denoting the expired vertex property in the database. - FieldExpired = "expired" // FieldNumber holds the string denoting the number vertex property in the database. - FieldNumber = "number" + FieldID = "id" + // FieldExpired holds the string denoting the expired field in the database. + FieldExpired = "expired" + // FieldNumber holds the string denoting the number field in the database. + FieldNumber = "number" // EdgeOwner holds the string denoting the owner edge name in mutations. EdgeOwner = "owner" diff --git a/examples/o2o2types/ent/user/user.go b/examples/o2o2types/ent/user/user.go index 0b4a78b92..a5d63b447 100644 --- a/examples/o2o2types/ent/user/user.go +++ b/examples/o2o2types/ent/user/user.go @@ -10,8 +10,10 @@ const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldAge holds the string denoting the age vertex property in the database. - FieldAge = "age" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldAge holds the string denoting the age field in the database. + FieldAge = "age" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeCard holds the string denoting the card edge name in mutations. diff --git a/examples/o2obidi/ent/user/user.go b/examples/o2obidi/ent/user/user.go index 193e5dce5..c0fd62efc 100644 --- a/examples/o2obidi/ent/user/user.go +++ b/examples/o2obidi/ent/user/user.go @@ -10,8 +10,10 @@ const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldAge holds the string denoting the age vertex property in the database. - FieldAge = "age" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldAge holds the string denoting the age field in the database. + FieldAge = "age" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeSpouse holds the string denoting the spouse edge name in mutations. diff --git a/examples/o2orecur/ent/node/node.go b/examples/o2orecur/ent/node/node.go index 8e88e2e9f..9288bcb31 100644 --- a/examples/o2orecur/ent/node/node.go +++ b/examples/o2orecur/ent/node/node.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the node type in the database. Label = "node" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldValue holds the string denoting the value vertex property in the database. + FieldID = "id" + // FieldValue holds the string denoting the value field in the database. FieldValue = "value" // EdgePrev holds the string denoting the prev edge name in mutations. diff --git a/examples/start/ent/car/car.go b/examples/start/ent/car/car.go index 00e69924e..df5eb3b89 100644 --- a/examples/start/ent/car/car.go +++ b/examples/start/ent/car/car.go @@ -10,8 +10,10 @@ const ( // Label holds the string label denoting the car type in the database. Label = "car" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldModel holds the string denoting the model vertex property in the database. - FieldModel = "model" // FieldRegisteredAt holds the string denoting the registered_at vertex property in the database. + FieldID = "id" + // FieldModel holds the string denoting the model field in the database. + FieldModel = "model" + // FieldRegisteredAt holds the string denoting the registered_at field in the database. FieldRegisteredAt = "registered_at" // EdgeOwner holds the string denoting the owner edge name in mutations. diff --git a/examples/start/ent/group/group.go b/examples/start/ent/group/group.go index 9b0ffd04a..58c4901cc 100644 --- a/examples/start/ent/group/group.go +++ b/examples/start/ent/group/group.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the group type in the database. Label = "group" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeUsers holds the string denoting the users edge name in mutations. diff --git a/examples/start/ent/user/user.go b/examples/start/ent/user/user.go index dfa494bdb..a14ffb377 100644 --- a/examples/start/ent/user/user.go +++ b/examples/start/ent/user/user.go @@ -10,8 +10,10 @@ const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldAge holds the string denoting the age vertex property in the database. - FieldAge = "age" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldAge holds the string denoting the age field in the database. + FieldAge = "age" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeCars holds the string denoting the cars edge name in mutations. diff --git a/examples/traversal/ent/group/group.go b/examples/traversal/ent/group/group.go index e1040ec82..56be30a7b 100644 --- a/examples/traversal/ent/group/group.go +++ b/examples/traversal/ent/group/group.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the group type in the database. Label = "group" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeUsers holds the string denoting the users edge name in mutations. diff --git a/examples/traversal/ent/pet/pet.go b/examples/traversal/ent/pet/pet.go index ea221a951..eb25e916d 100644 --- a/examples/traversal/ent/pet/pet.go +++ b/examples/traversal/ent/pet/pet.go @@ -10,7 +10,8 @@ const ( // Label holds the string label denoting the pet type in the database. Label = "pet" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgeFriends holds the string denoting the friends edge name in mutations. diff --git a/examples/traversal/ent/user/user.go b/examples/traversal/ent/user/user.go index 7c01b9f04..5e9c5e634 100644 --- a/examples/traversal/ent/user/user.go +++ b/examples/traversal/ent/user/user.go @@ -10,8 +10,10 @@ const ( // Label holds the string label denoting the user type in the database. Label = "user" // FieldID holds the string denoting the id field in the database. - FieldID = "id" // FieldAge holds the string denoting the age vertex property in the database. - FieldAge = "age" // FieldName holds the string denoting the name vertex property in the database. + FieldID = "id" + // FieldAge holds the string denoting the age field in the database. + FieldAge = "age" + // FieldName holds the string denoting the name field in the database. FieldName = "name" // EdgePets holds the string denoting the pets edge name in mutations.