32 lines
754 B
Go
32 lines
754 B
Go
package model
|
|
|
|
import (
|
|
"github.com/gofrs/uuid"
|
|
"time"
|
|
)
|
|
|
|
type User struct {
|
|
ID *uuid.UUID `json:"ID"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
UpdatedAt *time.Time `json:"updatedAt"`
|
|
UserEditable
|
|
}
|
|
|
|
type UserEditable struct {
|
|
Firstname string `json:"first_name" binding:"required"`
|
|
Lastname string `json:"last_name" binding:"required"`
|
|
Email string `json:"email" binding:"required"`
|
|
Password string `json:"password" binding:"required"`
|
|
}
|
|
|
|
type UserLoginRequest struct {
|
|
Email string `json:"email" binding:"required"`
|
|
Password string `json:"password" binding:"required"`
|
|
}
|
|
|
|
type UserLoginResponse struct {
|
|
AccessToken string `json:"accessToken"`
|
|
TokenType string `json:"tokenType"`
|
|
ExpiresIn string `json:"expiresIn"`
|
|
}
|