16 lines
455 B
Go
16 lines
455 B
Go
package data
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Movie struct {
|
|
ID int64 `json:"id"`
|
|
CreatedAt time.Time `json:"-"` // Use the - directive
|
|
Title string `json:"title"`
|
|
Year int32 `json:"year,omitempty"` // Add the omitempty directive
|
|
Runtime Runtime `json:"runtime,omitempty"` // Add the omitempty directive
|
|
Genres []string `json:"genres,omitempty"` // Add the omitempty directive
|
|
Version int32 `json:"version"`
|
|
}
|