Compare commits

...

5 Commits

Author SHA1 Message Date
eb7d9bee0c Added DTOs for RefhreshToken action 2025-10-20 21:21:40 +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
72d5f93a30 Fixes in packages namespaces 2025-10-20 16:25:55 +02:00
9 changed files with 45 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
package dto
package catalog
import (
"time"

View File

@@ -1,4 +1,4 @@
package entity
package catalog
import "github.com/jackc/pgtype"

View File

@@ -1,4 +1,4 @@
package model
package catalog
import (
"time"

View File

@@ -1,4 +1,4 @@
package dto
package common
type ErrorResponseDTO struct {
Error string `json:"error"`

View File

@@ -1,4 +1,4 @@
package dto
package common
type HealthResponseDTO struct {
Status string `json:"status"`

View File

@@ -1,4 +1,4 @@
package vo
package common
import "strings"

View File

@@ -1,4 +1,4 @@
package vo
package common
type Money struct {
}

View File

@@ -6,5 +6,23 @@ type AuthLoginRequestDTO struct {
}
type AuthLoginResponseDTO struct {
Token string `json:"jwt_token"`
Token string `json:"token"`
}
type AuthRefreshTokenRequestDTO struct {
AccessToken string `json:"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"`
}

19
identity/entity/user.go Normal file
View File

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