models

package
v0.0.0-...-65a2ed7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPartido

func AddPartido(m *Partido) (id int64, err error)

AddPartido insert a new Partido into database and returns last inserted Id on success.

func AddPosicion

func AddPosicion(m *Posicion) (id int64, err error)

AddPosicion insert a new Posicion into database and returns last inserted Id on success.

func DeletePartido

func DeletePartido(id int) (err error)

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

func DeletePosicion

func DeletePosicion(id int) (err error)

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

func GetAllPartido

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

GetAllPartido retrieves all Partido matches certain condition. Returns empty list if no records exist

func GetAllPosicion

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

GetAllPosicion retrieves all Posicion matches certain condition. Returns empty list if no records exist

func UpdatePartidoById

func UpdatePartidoById(m *Partido) (err error)

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

func UpdatePosicionById

func UpdatePosicionById(m *Posicion) (err error)

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

Types

type Partido

type Partido struct {
	Id                int       `orm:"column(id);pk;auto"`
	EquipoLocalId     int       `orm:"column(equipo_local_id)"`
	EquipoVisitanteId int       `orm:"column(equipo_visitante_id)"`
	PuntajeLocal      int       `orm:"column(puntaje_local)"`
	PuntajeVisitante  int       `orm:"column(puntaje_visitante)"`
	Fecha             time.Time `orm:"column(fecha);type(date)"`
	CiudadId          int       `orm:"column(ciudad_id)"`
}

func GetPartidoById

func GetPartidoById(id int) (v *Partido, err error)

GetPartidoById retrieves Partido by Id. Returns error if Id doesn't exist

func (*Partido) TableName

func (t *Partido) TableName() string

type Posicion

type Posicion struct {
	Id              int `orm:"column(id);pk;auto"`
	EquipoId        int `orm:"column(equipo_id)"`
	Puesto          int `orm:"column(puesto)"`
	PartidoJugado   int `orm:"column(partido_jugado)"`
	PartidoGanado   int `orm:"column(partido_ganado)"`
	PartidoEmpatado int `orm:"column(partido_empatado)"`
	PartidoPerdido  int `orm:"column(partido_perdido)"`
	CantidadPuntaje int `orm:"column(cantidad_puntaje)"`
}

func GetPosicionById

func GetPosicionById(id int) (v *Posicion, err error)

GetPosicionById retrieves Posicion by Id. Returns error if Id doesn't exist

func (*Posicion) TableName

func (t *Posicion) TableName() string

Jump to

Keyboard shortcuts

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