aboutsummaryrefslogtreecommitdiffstats
path: root/api/dto/conference.go
blob: 99e6c08b561896e09a02f090f23794e3fd33b97c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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"`
}