Compare commits

...

6 Commits

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:"access_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 `db:"id" json:"id"`
Email string `db:"email" json:"email"`
Username string `db:"username" json:"username"`
Password string `db:"password" json:"password"`
CreatedAt time.Time `db:"created_at" json:"created_at"`
ModifiedAt time.Time `db:"modified_at" json:"modified_at"` // FIXME: zero-value issue
}
// var TestUser = &User{
// ID: 1,
// Username: "test",
// Password: "test",
// CreateDate: time.Now(),
// }