-
Notifications
You must be signed in to change notification settings - Fork 0
/
movie.go
26 lines (22 loc) · 1018 Bytes
/
movie.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
package models
import (
"go.mongodb.org/mongo-driver/bson/primitive"
)
type Viewer struct {
Rating int32 `bson:"rating,omitempty" json:"rating,omitempty"`
NumReviews int32 `bson:"numReviews,omitempty" json:"numReviews,omitempty"`
Meter int32 `bson:"meter,omitempty" json:"meter,omitempty"`
}
type Tomatoes struct {
Dvd int `bson:"dvd,omitempty" json:"dvd,omitempty"`
//LastUpdated `bson:"lastUpdated,omitempty" json:"lastUpdated,omitempty"`
Viewer Viewer `bson:"viewer,omitempty" json:"viewer,omitempty"`
}
type Movie struct {
ID primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
Plot string `json:"plot,omitempty" bson:"plot,omitempty"`
Genres []string `json:"genres,omitempty" bson:"genres,omitempty"`
Runtime int32 `json:"runtime,omitempty" bson:"runtime,omitempty"`
Title string `json:"title,omitempty" bson:"title,omitempty"`
Tomatoes Tomatoes `json:"tomatoes,omitempty" bson:"tomatoes,omitempty"`
}