@@ -8,8 +8,8 @@ type Event struct {
88 Description string `json:"description"`
99 ClubID uint `json:"club_id" gorm:"not null"`
1010 EventType EventType `json:"event_type" gorm:"type:varchar(20)"`
11- StartTime time.Time `json:"start_time " gorm:"not null"`
12- EndTime time.Time `json:"end_time " gorm:"not null"`
11+ EventDate time.Time `json:"event_date " gorm:"not null"`
12+ EventTime time.Time `json:"event_time " gorm:"not null"`
1313 Location string `json:"location,omitempty"`
1414 OnlineLink string `json:"online_link,omitempty"`
1515 MaxAttendees * int `json:"max_attendees,omitempty"`
@@ -48,8 +48,8 @@ type CreateEventRequest struct {
4848 Title string `json:"title" binding:"required"`
4949 Description string `json:"description"`
5050 EventType EventType `json:"event_type" binding:"required,oneof=in_person online"`
51- StartTime time.Time `json:"start_time " binding:"required"`
52- EndTime time.Time `json:"end_time " binding:"required,gtfield=StartTime "`
51+ EventDate time.Time `json:"event_date " binding:"required"`
52+ EventTime time.Time `json:"event_time " binding:"required"`
5353 Location string `json:"location,omitempty"`
5454 OnlineLink string `json:"online_link,omitempty"`
5555 MaxAttendees * int `json:"max_attendees,omitempty"`
@@ -60,8 +60,8 @@ type UpdateEventRequest struct {
6060 Title * string `json:"title,omitempty"`
6161 Description * string `json:"description,omitempty"`
6262 EventType * EventType `json:"event_type,omitempty" binding:"omitempty,oneof=in_person online"`
63- StartTime * time.Time `json:"start_time ,omitempty" binding:"omitempty"`
64- EndTime * time.Time `json:"end_time ,omitempty" binding:"omitempty,gtfield=StartTime "`
63+ EventDate * time.Time `json:"event_date ,omitempty" binding:"omitempty"`
64+ EventTime * time.Time `json:"event_time ,omitempty" binding:"omitempty"`
6565 Location * string `json:"location,omitempty"`
6666 OnlineLink * string `json:"online_link,omitempty"`
6767 MaxAttendees * int `json:"max_attendees,omitempty"`
@@ -78,8 +78,8 @@ type EventResponse struct {
7878 Description string `json:"description"`
7979 ClubID uint `json:"club_id"`
8080 EventType EventType `json:"event_type"`
81- StartTime string `json:"start_time "`
82- EndTime string `json:"end_time "`
81+ EventDate string `json:"event_date "`
82+ EventTime string `json:"event_time "`
8383 Location string `json:"location,omitempty"`
8484 OnlineLink string `json:"online_link,omitempty"`
8585 MaxAttendees * int `json:"max_attendees,omitempty"`
@@ -95,8 +95,8 @@ func (e *Event) ToResponse() EventResponse {
9595 Description : e .Description ,
9696 ClubID : e .ClubID ,
9797 EventType : e .EventType ,
98- StartTime : e .StartTime .Format (time .RFC3339 ),
99- EndTime : e . EndTime .Format (time .RFC3339 ),
98+ EventDate : e .EventDate .Format (time .RFC3339 ),
99+ EventTime : e . EventTime .Format (time .RFC3339 ),
100100 Location : e .Location ,
101101 OnlineLink : e .OnlineLink ,
102102 MaxAttendees : e .MaxAttendees ,
0 commit comments