add initial application structure with configuration, logging, and health check endpoints
This commit is contained in:
25
internal/domain/vo/hero.go
Normal file
25
internal/domain/vo/hero.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package vo
|
||||
|
||||
import "time"
|
||||
|
||||
type Hero struct {
|
||||
ID int64 `json:"id"`
|
||||
HeroName string `json:"heroName"`
|
||||
HeroCode string `json:"heroCode"`
|
||||
HeroAttrLv60 string `json:"heroAttrLv60"`
|
||||
Creator string `json:"creator"`
|
||||
CreateTime *time.Time `json:"createTime"`
|
||||
Updater string `json:"updater"`
|
||||
UpdateTime *time.Time `json:"updateTime"`
|
||||
Deleted bool `json:"deleted"`
|
||||
NickName string `json:"nickName"`
|
||||
Rarity string `json:"rarity"`
|
||||
Role string `json:"role"`
|
||||
Zodiac string `json:"zodiac"`
|
||||
HeadImgURL string `json:"headImgUrl"`
|
||||
Attribute string `json:"attribute"`
|
||||
Remark string `json:"remark"`
|
||||
RawJSON string `json:"rawJson"`
|
||||
SetContentJSON string `json:"setContentJson"`
|
||||
SetUpdateTime *time.Time `json:"setUpdateTime"`
|
||||
}
|
||||
22
internal/domain/vo/response.go
Normal file
22
internal/domain/vo/response.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package vo
|
||||
|
||||
type Response struct {
|
||||
Code string `json:"code"`
|
||||
Message string `json:"message"`
|
||||
Data any `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
func OK(data any) Response {
|
||||
return Response{
|
||||
Code: "OK",
|
||||
Message: "success",
|
||||
Data: data,
|
||||
}
|
||||
}
|
||||
|
||||
func Error(message string) Response {
|
||||
return Response{
|
||||
Code: "ERROR",
|
||||
Message: message,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user