WIP Add join_event in service_event
All checks were successful
Client CMS Check Build (NixCN CMS) TeamCity build finished
Backend Check Build (NixCN CMS) TeamCity build finished

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2026-01-31 08:29:02 +08:00
parent 70d1544cfe
commit 1d885feb1f
10 changed files with 76 additions and 91 deletions

View File

@@ -5,7 +5,6 @@ import (
"nixcn-cms/data"
"nixcn-cms/internal/exception"
"nixcn-cms/service/shared"
"time"
"github.com/google/uuid"
)
@@ -19,15 +18,9 @@ type EventInfoPayload struct {
Data *EventInfoData
}
type EventInfoResponse struct {
Name string `json:"name"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
}
type EventInfoResult struct {
Common shared.CommonResult
Data *EventInfoResponse
Data *data.EventIndexDoc
}
func (self *EventServiceImpl) GetEventInfo(payload *EventInfoPayload) (result *EventInfoResult) {
@@ -63,10 +56,14 @@ func (self *EventServiceImpl) GetEventInfo(payload *EventInfoPayload) (result *E
SetOriginal(exception.CommonSuccess).
Throw(payload.Context),
},
Data: &EventInfoResponse{
Name: event.Name,
StartTime: event.StartTime,
EndTime: event.EndTime,
Data: &data.EventIndexDoc{
EventId: event.EventId.String(),
Name: event.Name,
Type: event.Type,
Description: event.Description,
StartTime: event.StartTime,
EndTime: event.EndTime,
Thumbnail: event.Thumbnail,
},
}