Switch to edge fields for passwordtoken.

This commit is contained in:
mikestefanello 2025-04-10 09:07:53 -04:00
parent acf8a830d7
commit 1b86097376
19 changed files with 217 additions and 109 deletions

View file

@ -43,6 +43,20 @@ func (ptu *PasswordTokenUpdate) SetNillableHash(s *string) *PasswordTokenUpdate
return ptu
}
// SetUserID sets the "user_id" field.
func (ptu *PasswordTokenUpdate) SetUserID(i int) *PasswordTokenUpdate {
ptu.mutation.SetUserID(i)
return ptu
}
// SetNillableUserID sets the "user_id" field if the given value is not nil.
func (ptu *PasswordTokenUpdate) SetNillableUserID(i *int) *PasswordTokenUpdate {
if i != nil {
ptu.SetUserID(*i)
}
return ptu
}
// SetCreatedAt sets the "created_at" field.
func (ptu *PasswordTokenUpdate) SetCreatedAt(t time.Time) *PasswordTokenUpdate {
ptu.mutation.SetCreatedAt(t)
@ -57,12 +71,6 @@ func (ptu *PasswordTokenUpdate) SetNillableCreatedAt(t *time.Time) *PasswordToke
return ptu
}
// SetUserID sets the "user" edge to the User entity by ID.
func (ptu *PasswordTokenUpdate) SetUserID(id int) *PasswordTokenUpdate {
ptu.mutation.SetUserID(id)
return ptu
}
// SetUser sets the "user" edge to the User entity.
func (ptu *PasswordTokenUpdate) SetUser(u *User) *PasswordTokenUpdate {
return ptu.SetUserID(u.ID)
@ -200,6 +208,20 @@ func (ptuo *PasswordTokenUpdateOne) SetNillableHash(s *string) *PasswordTokenUpd
return ptuo
}
// SetUserID sets the "user_id" field.
func (ptuo *PasswordTokenUpdateOne) SetUserID(i int) *PasswordTokenUpdateOne {
ptuo.mutation.SetUserID(i)
return ptuo
}
// SetNillableUserID sets the "user_id" field if the given value is not nil.
func (ptuo *PasswordTokenUpdateOne) SetNillableUserID(i *int) *PasswordTokenUpdateOne {
if i != nil {
ptuo.SetUserID(*i)
}
return ptuo
}
// SetCreatedAt sets the "created_at" field.
func (ptuo *PasswordTokenUpdateOne) SetCreatedAt(t time.Time) *PasswordTokenUpdateOne {
ptuo.mutation.SetCreatedAt(t)
@ -214,12 +236,6 @@ func (ptuo *PasswordTokenUpdateOne) SetNillableCreatedAt(t *time.Time) *Password
return ptuo
}
// SetUserID sets the "user" edge to the User entity by ID.
func (ptuo *PasswordTokenUpdateOne) SetUserID(id int) *PasswordTokenUpdateOne {
ptuo.mutation.SetUserID(id)
return ptuo
}
// SetUser sets the "user" edge to the User entity.
func (ptuo *PasswordTokenUpdateOne) SetUser(u *User) *PasswordTokenUpdateOne {
return ptuo.SetUserID(u.ID)