models

package
v0.0.0-...-e25b398 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Movie

type Movie struct {
	Id     int    `gorm:"primary_key;auto_increment" json:"id"`
	Name   string `gorm:"size:255;not null;unique" json:"name"`
	Rating int    `json:"rating"`
}

Movie structure.

func (*Movie) Initialize

func (movie *Movie) Initialize()

Initialize the default values of a given movie.

func (*Movie) Validate

func (movie *Movie) Validate() []common.FieldError

Validate a movie structure and returns all the errors encountered.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL