WIP Add join_event in service_event
Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
@@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
17
service/service_event/join_event.go
Normal file
17
service/service_event/join_event.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package service_event
|
||||
|
||||
import "nixcn-cms/service/shared"
|
||||
|
||||
type EventJoinData struct {
|
||||
}
|
||||
|
||||
type EventJoinPayload struct {
|
||||
}
|
||||
|
||||
type EventJoinResult struct {
|
||||
Common shared.CommonResult
|
||||
}
|
||||
|
||||
func (self *EventServiceImpl) JoinEvent(payload *EventJoinPayload) (result *EventJoinResult) {
|
||||
return
|
||||
}
|
||||
@@ -6,6 +6,7 @@ type EventService interface {
|
||||
CheckinQuery(*CheckinQueryPayload) *CheckinQueryResult
|
||||
GetEventInfo(*EventInfoPayload) *EventInfoResult
|
||||
ListEvents(*EventListPayload) *EventListResult
|
||||
JoinEvent(*EventJoinPayload) *EventJoinResult
|
||||
}
|
||||
|
||||
type EventServiceImpl struct{}
|
||||
|
||||
Reference in New Issue
Block a user