From ecc6a55aba7bb35fc778e7a53848396b88214151 Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Sat, 23 Aug 2025 22:29:28 +0100 Subject: Add multiple conferences feature --- api/dto/conference.go | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 api/dto/conference.go (limited to 'api/dto/conference.go') diff --git a/api/dto/conference.go b/api/dto/conference.go new file mode 100644 index 0000000..99e6c08 --- /dev/null +++ b/api/dto/conference.go @@ -0,0 +1,36 @@ +package dto + +import ( + "time" + + "github.com/LMBishop/confplanner/pkg/database/sqlc" +) + +type ConferenceResponse struct { + ID int32 `json:"id"` + Title string `json:"title"` + URL string `json:"url"` + Venue string `json:"venue"` + City string `json:"city"` +} + +func (dst *ConferenceResponse) Scan(src sqlc.Conference) { + dst.ID = src.ID + dst.Title = src.Title.String + dst.URL = src.Url + dst.Venue = src.Venue.String + dst.City = src.City.String +} + +type GetScheduleResponse struct { + Schedule interface{} `json:"schedule"` + LastUpdated time.Time `json:"lastUpdated"` +} + +type CreateConferenceRequest struct { + URL string `json:"url" validate:"required"` +} + +type DeleteConferenceRequest struct { + ID int32 `json:"id"` +} -- cgit v1.2.3-70-g09d2