@@ -13,6 +13,7 @@ type Event struct {
1313 Location string `json:"location,omitempty"`
1414 OnlineLink string `json:"online_link,omitempty"`
1515 MaxAttendees * int `json:"max_attendees,omitempty"`
16+ IsPublic bool `json:"is_public" gorm:"default:false"`
1617 CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
1718 Club Club `json:"club" gorm:"foreignKey:ClubID"`
1819 RSVPs []EventRSVP `json:"rsvps,omitempty"`
@@ -52,6 +53,7 @@ type CreateEventRequest struct {
5253 Location string `json:"location,omitempty"`
5354 OnlineLink string `json:"online_link,omitempty"`
5455 MaxAttendees * int `json:"max_attendees,omitempty"`
56+ IsPublic bool `json:"is_public" gorm:"default:false"`
5557}
5658
5759type UpdateEventRequest struct {
@@ -63,6 +65,7 @@ type UpdateEventRequest struct {
6365 Location * string `json:"location,omitempty"`
6466 OnlineLink * string `json:"online_link,omitempty"`
6567 MaxAttendees * int `json:"max_attendees,omitempty"`
68+ IsPublic * bool `json:"is_public,omitempty"`
6669}
6770
6871type RSVPRequest struct {
@@ -82,6 +85,7 @@ type EventResponse struct {
8285 MaxAttendees * int `json:"max_attendees,omitempty"`
8386 CreatedAt time.Time `json:"created_at"`
8487 RSVPs []EventRSVP `json:"rsvps,omitempty"`
88+ IsPublic * bool `json:"is_public,omitempty"`
8589}
8690
8791func (e * Event ) ToResponse () EventResponse {
@@ -98,5 +102,6 @@ func (e *Event) ToResponse() EventResponse {
98102 MaxAttendees : e .MaxAttendees ,
99103 CreatedAt : e .CreatedAt ,
100104 RSVPs : e .RSVPs ,
105+ IsPublic : & e .IsPublic ,
101106 }
102107}
0 commit comments