wip
This commit is contained in:
31
mangezmieux-backend/internal/users/model/model.go
Normal file
31
mangezmieux-backend/internal/users/model/model.go
Normal file
@@ -0,0 +1,31 @@
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user