Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b91bb7e4d | |||
| fc0130e573 | |||
| f675a12790 | |||
| 990cc6f9af | |||
| 72d5f93a30 | |||
| 54ff2581ed |
@@ -1,4 +1,4 @@
|
|||||||
package dto
|
package catalog
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package entity
|
package catalog
|
||||||
|
|
||||||
import "github.com/jackc/pgtype"
|
import "github.com/jackc/pgtype"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package model
|
package catalog
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package dto
|
package common
|
||||||
|
|
||||||
type ErrorResponseDTO struct {
|
type ErrorResponseDTO struct {
|
||||||
Error string `json:"error"`
|
Error string `json:"error"`
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package dto
|
package common
|
||||||
|
|
||||||
type HealthResponseDTO struct {
|
type HealthResponseDTO struct {
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package vo
|
package common
|
||||||
|
|
||||||
import "strings"
|
import "strings"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package vo
|
package common
|
||||||
|
|
||||||
type Money struct {
|
type Money struct {
|
||||||
}
|
}
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -1,4 +1,4 @@
|
|||||||
module git.ego.cloudns.be/egommerce/api-entities
|
module git.ego.freeddns.org/egommerce/api-entities
|
||||||
|
|
||||||
go 1.19
|
go 1.19
|
||||||
|
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
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
19
identity/entity/user.go
Normal 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(),
|
||||||
|
// }
|
||||||
Reference in New Issue
Block a user