feat: user updated with phone_number field

This commit is contained in:
2025-05-18 20:05:01 +02:00
parent 097eef0016
commit 9a48522aa7
2 changed files with 3 additions and 1 deletions

View File

@ -18,4 +18,5 @@ type User struct {
CreatedAt pgtype.Timestamptz `json:"created_at"`
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
LastLogin pgtype.Timestamptz `json:"last_login"`
PhoneNumber pgtype.Text `json:"phone_number"`
}

View File

@ -12,7 +12,7 @@ import (
)
const findAllUsers = `-- name: FindAllUsers :many
SELECT id, email, full_name, password_hash, is_admin, created_at, updated_at, last_login FROM users
SELECT id, email, full_name, password_hash, is_admin, created_at, updated_at, last_login, phone_number FROM users
`
func (q *Queries) FindAllUsers(ctx context.Context) ([]User, error) {
@ -33,6 +33,7 @@ func (q *Queries) FindAllUsers(ctx context.Context) ([]User, error) {
&i.CreatedAt,
&i.UpdatedAt,
&i.LastLogin,
&i.PhoneNumber,
); err != nil {
return nil, err
}