Added email validation to user entities.
This commit is contained in:
parent
cabf8b9cdb
commit
db4da26af9
3 changed files with 57 additions and 4 deletions
34
ent/admin/templates/entity_types.tmpl
Normal file
34
ent/admin/templates/entity_types.tmpl
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{{/* Tell Intellij/GoLand to enable the autocompletion based on the *gen.Graph type. */}}
|
||||
{{/* gotype: entgo.io/ent/entc/gen.Graph */}}
|
||||
|
||||
{{ define "admin/types" }}
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
package admin
|
||||
|
||||
{{ range $n := $.Nodes }}
|
||||
type {{ $n.Name }} struct {
|
||||
// Fields.
|
||||
{{- range $f := $n.Fields }}
|
||||
{{ fieldName $f.Name }} {{ $f.Type }} `form:"{{ $f.Name }}"`
|
||||
{{- end }}
|
||||
// Edges.
|
||||
{{- range $e := $n.Edges }}
|
||||
{{- if not $e.Inverse}}
|
||||
// {{ fieldName $e.Name }} int `form:"{{ $e.Name }}"`
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
type EntityList struct {
|
||||
Columns []string
|
||||
Entities []EntityValues
|
||||
HasNextPage bool
|
||||
}
|
||||
|
||||
type EntityValues struct {
|
||||
ID int
|
||||
Values []string
|
||||
}
|
||||
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue