Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4cc80edfbc
|
||
|
|
245ff35e58 |
@@ -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"`
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type ServiceUser struct {
|
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"`
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-4
@@ -1,12 +1,18 @@
|
|||||||
package user
|
package user
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
type User struct {
|
type User struct {
|
||||||
Id uuid.UUID `json:"id"`
|
Id uuid.UUID `json:"id"`
|
||||||
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"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user