55 "net/http"
66 "time"
77
8+ "github.com/hammer-code/lms-be/constants"
89 "gopkg.in/guregu/null.v4"
910)
1011
@@ -67,7 +68,7 @@ type Event struct {
6768 Author string `json:"author"`
6869 Image string `json:"image"`
6970 Date null.Time `json:"date"`
70- Type string `json:"type"`
71+ Type constants. EventType `json:"type"`
7172 Location string `json:"location"`
7273 Duration string `json:"duration"`
7374 Capacity int `json:"capacity"`
@@ -119,7 +120,7 @@ type CreateEventPayload struct {
119120 Slug string `json:"slug" validate:"required"`
120121 IsOnline string `json:"is_online" validate:"required"`
121122 Date null.Time `json:"date" validate:"required"`
122- Type string `json:"type" validate:"required"`
123+ Type constants. EventType `json:"type" validate:"required"`
123124 Location string `json:"location" validate:"required"`
124125 Duration string `json:"duration" validate:"required"`
125126 Status string `json:"status" validate:"required"`
@@ -141,7 +142,7 @@ type UpdateEventPayload struct {
141142 Slug string `json:"slug" validate:"required"`
142143 IsOnline string `json:"is_online" validate:"required"`
143144 Date null.Time `json:"date" validate:"required"`
144- Type string `json:"type" validate:"required"`
145+ Type constants. EventType `json:"type" validate:"required"`
145146 Location string `json:"location" validate:"required"`
146147 Duration string `json:"duration" validate:"required"`
147148 Status string `json:"status" validate:"required"`
@@ -162,7 +163,7 @@ type EventDTO struct {
162163 Author string `json:"author"`
163164 ImageEvent string `json:"image_event"`
164165 DateEvent null.Time `json:"date_event"`
165- Type string `json:"type"`
166+ Type constants. EventType `json:"type"`
166167 Location string `json:"location"`
167168 Duration string `json:"duration"`
168169 Capacity int `json:"capacity"`
@@ -175,7 +176,7 @@ type UpdateEvenPayload struct {
175176 Author string `json:"author"`
176177 ImageEvent string `json:"image_event"`
177178 DateEvent null.Time `json:"date_event"`
178- Type string `json:"type"`
179+ Type constants. EventType `json:"type"`
179180 Location string `json:"location"`
180181 Duration string `json:"duration"`
181182 Capacity int `json:"capacity"`
0 commit comments