Files
go-playground/projects/greenlight/internal/data/movies.go
T
2026-03-11 15:50:38 +01:00

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"`
}