-
Notifications
You must be signed in to change notification settings - Fork 0
/
event.go
39 lines (33 loc) · 1.03 KB
/
event.go
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
37
38
39
package common
import (
"time"
"github.com/mgagliardo91/go-utils"
)
type Location struct {
Latitude float64 `json:"lat"`
Longitude float64 `json:"lon"`
}
type OfflineEvent struct {
Address string `json:"address"`
Category string `json:"category"`
Description string `json:"description"`
EndDateTime int64 `json:"endDateTime"`
EventURL string `json:"eventUrl"`
EventID string `json:"eventId"`
ID string `json:"id"`
ImageURL string `json:"imageUrl"`
Location Location `json:"location"`
OfflineURL string `json:"offlineUrl"`
Price float64 `json:"price"`
ReferralURLs []string `json:"referralUrls"`
StartDateTime int64 `json:"startDateTime"`
Tags []string `json:"tags"`
Teaser string `json:"teaser"`
Title string `json:"title"`
}
func (o *OfflineEvent) GetStartDateTime() time.Time {
return utils.MilisToTime(o.StartDateTime)
}
func (o *OfflineEvent) GetEndDateTime() time.Time {
return utils.MilisToTime(o.EndDateTime)
}