add initial application structure with configuration, logging, and health check endpoints

This commit is contained in:
kever
2026-01-15 22:11:33 +08:00
parent ed8c3d55b8
commit fe67f09e72
19 changed files with 333 additions and 318 deletions

View File

@@ -1,5 +0,0 @@
package dto
type HealthRequest struct {
Ping string `json:"ping"`
}

View File

@@ -19,8 +19,8 @@ type HeroCreateRequest struct {
Attribute *string `json:"attribute"`
Remark *string `json:"remark"`
RawJSON *string `json:"rawJson"`
SetContentJSON *string `json:"setContentJson"`
SetUpdateTime *time.Time `json:"setUpdateTime"`
ContentJSONSet *string `json:"contentJsonSet"`
UpdateTimeSet *time.Time `json:"updateTimeSet"`
}
type HeroUpdateRequest struct {
@@ -38,6 +38,6 @@ type HeroUpdateRequest struct {
Attribute *string `json:"attribute"`
Remark *string `json:"remark"`
RawJSON *string `json:"rawJson"`
SetContentJSON *string `json:"setContentJson"`
SetUpdateTime *time.Time `json:"setUpdateTime"`
ContentJSONSet *string `json:"contentJsonSet"`
UpdateTimeSet *time.Time `json:"updateTimeSet"`
}

View File

@@ -0,0 +1,3 @@
package entity
//go:generate go run entgo.io/ent/cmd/ent@v0.14.5 generate ./internal/domain/entity --target ./internal/ent

View File

@@ -32,7 +32,7 @@ func (EpicHeroInfo) Fields() []ent.Field {
field.String("attribute").MaxLen(255),
field.String("remark").MaxLen(255),
field.String("raw_json").MaxLen(255),
field.String("set_content_json").MaxLen(255),
field.Time("set_update_time").Optional().Nillable(),
field.String("content_json_set").MaxLen(255),
field.Time("update_time_set").Optional().Nillable(),
}
}

View File

@@ -20,6 +20,6 @@ type Hero struct {
Attribute string `json:"attribute"`
Remark string `json:"remark"`
RawJSON string `json:"rawJson"`
SetContentJSON string `json:"setContentJson"`
SetUpdateTime *time.Time `json:"setUpdateTime"`
ContentJSONSet string `json:"contentJsonSet"`
UpdateTimeSet *time.Time `json:"updateTimeSet"`
}