models

package
v0.0.0-...-49c6f7a Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModToProto

func ModToProto(mod *Mod) *protobuffer.Mod

func ModsToProto

func ModsToProto(mods []*Mod) []*protobuffer.Mod

func PaginationToProto

func PaginationToProto(pagination *paginate.Page) *protobuffer.Pagination

Types

type ListQuery

type ListQuery struct {
	Size    int    `url:"size,omitempty"`
	Page    int    `url:"page,omitempty"`
	OrderBy string `url:"orderBy,omitempty"`
}

type Mod

type Mod struct {
	gorm.Model
	ID          string `gorm:"primaryKey;type:uuid;default:uuid_generate_v4()" validate:"omitempty,uuid4"`
	Name        string `gorm:"type:varchar(50);not null;default:null;unique" validate:"min=1,max=50"`
	Description string `gorm:"type:varchar(250);not null;default:null" validate:"min=1,max=250"`

	ReleaseYear int16 `gorm:"type:smallint;not null;default:null" validate:"min=1950"`
}

Jump to

Keyboard shortcuts

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