From 245ff35e58739265c7dcb0918015ce2f86b21993 Mon Sep 17 00:00:00 2001 From: phoenix Date: Tue, 16 Dec 2025 02:38:30 +0000 Subject: [PATCH] tsk-14: User improvements (#20) Closes #14 Reviewed-on: https://git.kundeng.us/phoenix/textsender-models/pulls/20 Co-authored-by: phoenix Co-committed-by: phoenix --- tx0/user/service_user.go | 8 ++++---- tx0/user/user.go | 14 ++++++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/tx0/user/service_user.go b/tx0/user/service_user.go index 8bcbda8..22762d5 100644 --- a/tx0/user/service_user.go +++ b/tx0/user/service_user.go @@ -7,8 +7,8 @@ import ( ) type ServiceUser struct { - Id uuid.UUID `json:"id"` - Username string `json:"username,omitempty"` - Passphrase string `json:"passphrase,omitempty"` - Created *time.Time `json:"date_created,omitempty"` + Id uuid.UUID `json:"id"` + Username string `json:"username,omitempty"` + Passphrase string `json:"passphrase,omitempty"` + Created time.Time `json:"date_created"` } diff --git a/tx0/user/user.go b/tx0/user/user.go index 0327720..ab6f8af 100644 --- a/tx0/user/user.go +++ b/tx0/user/user.go @@ -1,12 +1,18 @@ package user import ( + "time" + "github.com/google/uuid" ) type User struct { - Id uuid.UUID `json:"id"` - PhoneNumber string `json:"phone_number"` - Username string `json:"username"` - Password string `json:"password"` + Id uuid.UUID `json:"id"` + PhoneNumber string `json:"phone_number"` + Username string `json:"username"` + Password string `json:"password"` + Firstname *string `json:"first_name,omitempty"` + Lastname *string `json:"last_name,omitempty"` + Created time.Time `json:"date_created"` + LastLogin *time.Time `json:"last_login,omitempty"` }