add initial application structure with configuration, logging, and health check endpoints
This commit is contained in:
@@ -35,7 +35,7 @@ func (r *HeroRepository) Create(ctx context.Context, req dto.HeroCreateRequest)
|
||||
SetAttribute(valueOrEmpty(req.Attribute)).
|
||||
SetRemark(valueOrEmpty(req.Remark)).
|
||||
SetRawJSON(valueOrEmpty(req.RawJSON)).
|
||||
SetSetContentJSON(valueOrEmpty(req.SetContentJSON))
|
||||
SetContentJSONSet(valueOrEmpty(req.ContentJSONSet))
|
||||
|
||||
if req.CreateTime != nil {
|
||||
create.SetCreateTime(*req.CreateTime)
|
||||
@@ -43,8 +43,8 @@ func (r *HeroRepository) Create(ctx context.Context, req dto.HeroCreateRequest)
|
||||
if req.UpdateTime != nil {
|
||||
create.SetUpdateTime(*req.UpdateTime)
|
||||
}
|
||||
if req.SetUpdateTime != nil {
|
||||
create.SetSetUpdateTime(*req.SetUpdateTime)
|
||||
if req.UpdateTimeSet != nil {
|
||||
create.SetUpdateTimeSet(*req.UpdateTimeSet)
|
||||
}
|
||||
|
||||
hero, err := create.Save(ctx)
|
||||
@@ -132,12 +132,12 @@ func (r *HeroRepository) Update(ctx context.Context, id int64, req dto.HeroUpdat
|
||||
update.SetRawJSON(*req.RawJSON)
|
||||
updated = true
|
||||
}
|
||||
if req.SetContentJSON != nil {
|
||||
update.SetSetContentJSON(*req.SetContentJSON)
|
||||
if req.ContentJSONSet != nil {
|
||||
update.SetContentJSONSet(*req.ContentJSONSet)
|
||||
updated = true
|
||||
}
|
||||
if req.SetUpdateTime != nil {
|
||||
update.SetSetUpdateTime(*req.SetUpdateTime)
|
||||
if req.UpdateTimeSet != nil {
|
||||
update.SetUpdateTimeSet(*req.UpdateTimeSet)
|
||||
updated = true
|
||||
}
|
||||
|
||||
@@ -198,8 +198,8 @@ func toVO(hero *ent.EpicHeroInfo) vo.Hero {
|
||||
Attribute: hero.Attribute,
|
||||
Remark: hero.Remark,
|
||||
RawJSON: hero.RawJSON,
|
||||
SetContentJSON: hero.SetContentJSON,
|
||||
SetUpdateTime: hero.SetUpdateTime,
|
||||
ContentJSONSet: hero.ContentJSONSet,
|
||||
UpdateTimeSet: hero.UpdateTimeSet,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user