change users table

This commit is contained in:
2026-07-13 12:11:35 +05:00
parent c29c72fd92
commit 6705c4ce91
22 changed files with 3150 additions and 83 deletions

View File

@@ -26,7 +26,7 @@ func NewRepository(client postgresql.Client, logger *logging.Logger) auth.Reposi
const (
loginQuery = `SELECT id, password FROM users WHERE email = $1`
userByIDQuery = `SELECT id, password FROM users WHERE id = $1`
profileQuery = `SELECT id, fullname, phone_number, avatar, created_at
profileQuery = `SELECT id, name, first_name, last_name, phone, avatar, created_at
FROM users WHERE id = $1`
)
@@ -46,8 +46,10 @@ func (r *repository) GetProfile(ctx context.Context, id int) (auth.UserProfileDT
var profile auth.UserProfileDTO
err := r.client.QueryRow(ctx, profileQuery, id).Scan(
&profile.Id,
&profile.FullName,
&profile.PhoneNumber,
&profile.Name,
&profile.FirstName,
&profile.LastName,
&profile.Phone,
&profile.Avatar,
&profile.CreatedAt,
)