Compare commits

..
Author SHA1 Message Date
phoenix 4cc80edfbc tsk-15: Added User Id to Login 2025-12-15 21:44:06 -05:00
phoenixandphoenix 245ff35e58 tsk-14: User improvements (#20)
Closes #14

Reviewed-on: phoenix/textsender-models#20
Co-authored-by: phoenix <kundeng00@pm.me>
Co-committed-by: phoenix <kundeng00@pm.me>
2025-12-16 02:38:30 +00:00
3 changed files with 15 additions and 8 deletions
+1
View File
@@ -12,6 +12,7 @@ type Claims struct {
} }
type Login struct { type Login struct {
UserId uuid.UUID `json:"user_id"`
AccessToken string `json:"access_token"` AccessToken string `json:"access_token"`
TokenType string `json:"token_type"` TokenType string `json:"token_type"`
ExpiresIn int64 `json:"expires_in"` ExpiresIn int64 `json:"expires_in"`
+1 -1
View File
@@ -10,5 +10,5 @@ type ServiceUser struct {
Id uuid.UUID `json:"id"` Id uuid.UUID `json:"id"`
Username string `json:"username,omitempty"` Username string `json:"username,omitempty"`
Passphrase string `json:"passphrase,omitempty"` Passphrase string `json:"passphrase,omitempty"`
Created *time.Time `json:"date_created,omitempty"` Created time.Time `json:"date_created"`
} }
+6
View File
@@ -1,6 +1,8 @@
package user package user
import ( import (
"time"
"github.com/google/uuid" "github.com/google/uuid"
) )
@@ -9,4 +11,8 @@ type User struct {
PhoneNumber string `json:"phone_number"` PhoneNumber string `json:"phone_number"`
Username string `json:"username"` Username string `json:"username"`
Password string `json:"password"` 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"`
} }