Compare commits

..

4 Commits

Author SHA1 Message Date
403e2a390b Added DTOs for RefhreshToken action 2025-10-20 21:05:50 +02:00
fc0130e573 Renamed jwt_token to token 2025-10-20 18:48:34 +02:00
f675a12790 Added Register DTO 2025-10-20 16:33:49 +02:00
990cc6f9af Added email field to the User Entity 2025-10-20 16:30:45 +02:00
2 changed files with 26 additions and 7 deletions

View File

@@ -6,5 +6,23 @@ type AuthLoginRequestDTO struct {
} }
type AuthLoginResponseDTO struct { type AuthLoginResponseDTO struct {
Token string `json:"jwt_token"` Token string `json:"token"`
}
type AuthRefreshTokenRequestDTO struct {
RefreshToken string `json:"refresh_token"`
}
type AuthRefreshTokenResponseDTO struct {
Token string `json:"token"`
}
type AuthRegisterRequestDTO struct {
Email string `json:"email"`
Username string `json:"username"`
Password string `json:"password"`
}
type AuthRegisterResponseDTO struct {
ID string `json:"id"`
} }

View File

@@ -4,15 +4,16 @@ import "time"
type User struct { type User struct {
ID int `json:"id"` ID int `json:"id"`
Email string `json:"email"`
Username string `json:"username"` Username string `json:"username"`
Password string `json:"password"` Password string `json:"password"`
CreateDate time.Time `json:"create_date"` CreateDate time.Time `json:"create_date"`
ModifyDate time.Time `json:"modify_date"` // FIXME: zero-value issue ModifyDate time.Time `json:"modify_date"` // FIXME: zero-value issue
} }
var TestUser = &User{ // var TestUser = &User{
ID: 1, // ID: 1,
Username: "test", // Username: "test",
Password: "test", // Password: "test",
CreateDate: time.Now(), // CreateDate: time.Now(),
} // }