diff --git a/cmd/server/handler/event_handler.go b/cmd/server/handler/event_handler.go index 20df19b..924bdea 100644 --- a/cmd/server/handler/event_handler.go +++ b/cmd/server/handler/event_handler.go @@ -27,6 +27,7 @@ func NewEventHandler(authService service.AuthService) *EventHandler { func generateDummyEvent() event.ShortTermView { profileImageURL := "https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_1280.png" now := time.Now() + startAt := now.AddDate(0, 0, 1) maxParticipants := 3 return event.ShortTermView{ BaseView: event.BaseView{ @@ -51,6 +52,7 @@ func generateDummyEvent() event.ShortTermView { Topics: []event.EventTopic{event.ETC}, MaxParticipants: &maxParticipants, GenderCondition: "all", + StartAt: &startAt, CreatedAt: now, UpdatedAt: now, }, diff --git a/internal/domain/event/request.go b/internal/domain/event/request.go index a65c4a4..5eee1f1 100644 --- a/internal/domain/event/request.go +++ b/internal/domain/event/request.go @@ -1,5 +1,7 @@ package event +import "time" + type CreateRequest struct { BaseCreateRequest RecurringPeriod *EventRecurringPeriod `json:"recurringPeriod,omitempty"` @@ -14,6 +16,7 @@ type BaseCreateRequest struct { Topics []EventTopic `json:"topics"` MaxParticipants *int `json:"maxParticipants,omitempty"` GenderCondition string `json:"genderCondition" enums:"male,female,all"` + StartAt *time.Time `json:"startAt,omitempty"` } type ShortTermCreateRequest struct { @@ -38,6 +41,7 @@ type BaseUpdateRequest struct { Topics []EventTopic `json:"topics"` MaxParticipants *int `json:"maxParticipants,omitempty"` GenderCondition string `json:"genderCondition" enums:"male,female,all"` + StartAt *time.Time `json:"startAt,omitempty"` } type ShortTermUpdateRequest struct { diff --git a/internal/domain/event/view.go b/internal/domain/event/view.go index 5beb04a..f036b90 100644 --- a/internal/domain/event/view.go +++ b/internal/domain/event/view.go @@ -23,6 +23,7 @@ type BaseView struct { Topics []EventTopic `json:"topics"` MaxParticipants *int `json:"maxParticipants,omitempty"` GenderCondition string `json:"genderCondition"` + StartAt *time.Time `json:"startAt,omitempty"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }