models

package
v0.0.0-...-977c914 Latest Latest
Warning

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

Go to latest
Published: May 5, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEquipo

func AddEquipo(m *Equipo) (id int64, err error)

AddEquipo insert a new Equipo into database and returns last inserted Id on success.

func DeleteEquipo

func DeleteEquipo(id int) (err error)

DeleteEquipo deletes Equipo by Id and returns error if the record to be deleted doesn't exist

func GetAllEquipo

func GetAllEquipo(query map[string]string, fields []string, sortby []string, order []string,
	offset int64, limit int64) (ml []interface{}, err error)

GetAllEquipo retrieves all Equipo matches certain condition. Returns empty list if no records exist

func UpdateEquipoById

func UpdateEquipoById(m *Equipo) (err error)

UpdateEquipo updates Equipo by Id and returns error if the record to be updated doesn't exist

Types

type Equipo

type Equipo struct {
	Id       int    `orm:"column(id);pk;auto"`
	Nombre   string `orm:"column(nombre)"`
	CiudadId int    `orm:"column(ciudad_id)"`
}

func GetEquipoById

func GetEquipoById(id int) (v *Equipo, err error)

GetEquipoById retrieves Equipo by Id. Returns error if Id doesn't exist

func (*Equipo) TableName

func (t *Equipo) TableName() string

Jump to

Keyboard shortcuts

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