Added password token entity.

This commit is contained in:
mikestefanello 2021-12-15 08:48:51 -05:00
parent 1ac68b7d9f
commit c9d50cb3d4
25 changed files with 3489 additions and 20 deletions

View file

@ -4,6 +4,7 @@ import (
"time"
"entgo.io/ent"
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
)
@ -31,5 +32,8 @@ func (User) Fields() []ent.Field {
// Edges of the User.
func (User) Edges() []ent.Edge {
return nil
return []ent.Edge{
edge.From("owner", PasswordToken.Type).
Ref("user"),
}
}