Added email field to user.

This commit is contained in:
mikestefanello 2021-12-14 21:16:48 -05:00
parent dee7a13cba
commit 6ec1b77684
16 changed files with 410 additions and 139 deletions

View file

@ -15,9 +15,11 @@ type User struct {
// Fields of the User.
func (User) Fields() []ent.Field {
return []ent.Field{
field.String("username").
Unique().
field.String("name").
NotEmpty(),
field.String("email").
NotEmpty().
Unique(),
field.String("password").
Sensitive().
NotEmpty(),