models

package
v0.0.0-...-2a86c8f Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddApropiacion

func AddApropiacion(m *Apropiacion) (id int64, err error)

AddApropiacion insert a new Apropiacion into database and returns last inserted Id on success.

func AddEstadoApropiacion

func AddEstadoApropiacion(m *EstadoApropiacion) (id int64, err error)

AddEstadoApropiacion insert a new EstadoApropiacion into database and returns last inserted Id on success.

func AddFuenteFinanciamiento

func AddFuenteFinanciamiento(m *FuenteFinanciamiento) (id int64, err error)

AddFuenteFinanciamiento insert a new FuenteFinanciamiento into database and returns last inserted Id on success.

func AddFuenteFinanciamientoApropiacion

func AddFuenteFinanciamientoApropiacion(m *FuenteFinanciamientoApropiacion) (id int64, err error)

AddFuenteFinanciamientoApropiacion insert a new FuenteFinanciamientoApropiacion into database and returns last inserted Id on success.

func AddRama

func AddRama(m *Rama) (id int64, err error)

AddRama insert a new Rama into database and returns last inserted Id on success.

func AddRubro

func AddRubro(m *Rubro) (id int64, err error)

AddRubro insert a new Rubro into database and returns last inserted Id on success.

func AddTipoFuenteFinanciamiento

func AddTipoFuenteFinanciamiento(m *TipoFuenteFinanciamiento) (id int64, err error)

AddTipoFuenteFinanciamiento insert a new TipoFuenteFinanciamiento into database and returns last inserted Id on success.

func DeleteApropiacion

func DeleteApropiacion(id int) (err error)

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

func DeleteEstadoApropiacion

func DeleteEstadoApropiacion(id int) (err error)

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

func DeleteFuenteFinanciamiento

func DeleteFuenteFinanciamiento(id int) (err error)

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

func DeleteFuenteFinanciamientoApropiacion

func DeleteFuenteFinanciamientoApropiacion(id int) (err error)

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

func DeleteRama

func DeleteRama(id int) (err error)

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

func DeleteRubro

func DeleteRubro(id int) (err error)

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

func DeleteTipoFuenteFinanciamiento

func DeleteTipoFuenteFinanciamiento(id int) (err error)

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

func GetAllApropiacion

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

GetAllApropiacion retrieves all Apropiacion matches certain condition. Returns empty list if no records exist

func GetAllEstadoApropiacion

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

GetAllEstadoApropiacion retrieves all EstadoApropiacion matches certain condition. Returns empty list if no records exist

func GetAllFuenteFinanciamiento

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

GetAllFuenteFinanciamiento retrieves all FuenteFinanciamiento matches certain condition. Returns empty list if no records exist

func GetAllFuenteFinanciamientoApropiacion

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

GetAllFuenteFinanciamientoApropiacion retrieves all FuenteFinanciamientoApropiacion matches certain condition. Returns empty list if no records exist

func GetAllRama

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

GetAllRama retrieves all Rama matches certain condition. Returns empty list if no records exist

func GetAllRubro

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

GetAllRubro retrieves all Rubro matches certain condition. Returns empty list if no records exist

func GetAllTipoFuenteFinanciamiento

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

GetAllTipoFuenteFinanciamiento retrieves all TipoFuenteFinanciamiento matches certain condition. Returns empty list if no records exist

func UpdateApropiacionById

func UpdateApropiacionById(m *Apropiacion) (err error)

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

func UpdateEstadoApropiacionById

func UpdateEstadoApropiacionById(m *EstadoApropiacion) (err error)

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

func UpdateFuenteFinanciamientoApropiacionById

func UpdateFuenteFinanciamientoApropiacionById(m *FuenteFinanciamientoApropiacion) (err error)

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

func UpdateFuenteFinanciamientoById

func UpdateFuenteFinanciamientoById(m *FuenteFinanciamiento) (err error)

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

func UpdateRamaById

func UpdateRamaById(m *Rama) (err error)

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

func UpdateRubroById

func UpdateRubroById(m *Rubro) (err error)

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

func UpdateTipoFuenteFinanciamientoById

func UpdateTipoFuenteFinanciamientoById(m *TipoFuenteFinanciamiento) (err error)

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

Types

type Apropiacion

type Apropiacion struct {
	Id                  int                `orm:"column(id);pk;auto"`
	Vigencia            int                `orm:"column(vigencia)"`
	Valor               float64            `orm:"column(valor)"`
	EstadoApropiacionId *EstadoApropiacion `orm:"column(estado_apropiacion_id);rel(fk)"`
	RubroId             *Rubro             `orm:"column(rubro_id);rel(fk)"`
}

func GetApropiacionById

func GetApropiacionById(id int) (v *Apropiacion, err error)

GetApropiacionById retrieves Apropiacion by Id. Returns error if Id doesn't exist

func (*Apropiacion) TableName

func (t *Apropiacion) TableName() string

type EstadoApropiacion

type EstadoApropiacion struct {
	Id                int    `orm:"column(id);pk;auto"`
	Nombre            string `orm:"column(nombre)"`
	Descripcion       string `orm:"column(descripcion)"`
	CodigoAbreviacion string `orm:"column(codigo_abreviacion)"`
	NumeroOrden       int    `orm:"column(numero_orden);null"`
	Activo            bool   `orm:"column(activo)"`
}

func GetEstadoApropiacionById

func GetEstadoApropiacionById(id int) (v *EstadoApropiacion, err error)

GetEstadoApropiacionById retrieves EstadoApropiacion by Id. Returns error if Id doesn't exist

func (*EstadoApropiacion) TableName

func (t *EstadoApropiacion) TableName() string

type FuenteFinanciamiento

type FuenteFinanciamiento struct {
	Id                       int                       `orm:"column(id);pk;auto"`
	Nombre                   string                    `orm:"column(nombre)"`
	Descripcion              string                    `orm:"column(descripcion);null"`
	FechaCreacion            time.Time                 `orm:"column(fecha_creacion);type(date);null"`
	TipoFuenteFinanciamiento *TipoFuenteFinanciamiento `orm:"column(tipo_fuente_financiamiento);rel(fk)"`
	Codigo                   string                    `orm:"column(codigo)"`
}

func GetFuenteFinanciamientoById

func GetFuenteFinanciamientoById(id int) (v *FuenteFinanciamiento, err error)

GetFuenteFinanciamientoById retrieves FuenteFinanciamiento by Id. Returns error if Id doesn't exist

func (*FuenteFinanciamiento) TableName

func (t *FuenteFinanciamiento) TableName() string

type FuenteFinanciamientoApropiacion

type FuenteFinanciamientoApropiacion struct {
	Id                     int                   `orm:"column(id);pk;auto"`
	ApropiacionId          *Apropiacion          `orm:"column(apropiacion_id);rel(fk)"`
	FuenteFinanciamientoId *FuenteFinanciamiento `orm:"column(fuente_financiamiento_id);rel(fk)"`
	Dependencia            int                   `orm:"column(dependencia)"`
}

func GetFuenteFinanciamientoApropiacionById

func GetFuenteFinanciamientoApropiacionById(id int) (v *FuenteFinanciamientoApropiacion, err error)

GetFuenteFinanciamientoApropiacionById retrieves FuenteFinanciamientoApropiacion by Id. Returns error if Id doesn't exist

func (*FuenteFinanciamientoApropiacion) TableName

func (t *FuenteFinanciamientoApropiacion) TableName() string

type Rama

type Rama struct {
	Id         int    `orm:"auto;column(id);pk;auto"`
	RubroPadre *Rubro `orm:"column(rubro_padre);rel(fk)"`
	RubroHijo  *Rubro `orm:"column(rubro_hijo);rel(fk)"`
}

func GetRamaById

func GetRamaById(id int) (v *Rama, err error)

GetRamaById retrieves Rama by Id. Returns error if Id doesn't exist

func (*Rama) TableName

func (t *Rama) TableName() string

type Rubro

type Rubro struct {
	Id              int    `orm:"auto;column(id);pk;auto"`
	Organizacion    int    `orm:"column(organizacion)"`
	Codigo          string `orm:"column(codigo)"`
	Descripcion     string `orm:"column(descripcion);null"`
	UnidadEjecutora int
	Nombre          string `orm:"column(nombre);null"`
}

func GetRubroById

func GetRubroById(id int) (v *Rubro, err error)

GetRubroById retrieves Rubro by Id. Returns error if Id doesn't exist

func (*Rubro) TableName

func (t *Rubro) TableName() string

type TipoFuenteFinanciamiento

type TipoFuenteFinanciamiento struct {
	Id          int    `orm:"column(id);pk;auto"`
	Nombre      string `orm:"column(nombre)"`
	Descripcion string `orm:"column(descripcion);null"`
}

func GetTipoFuenteFinanciamientoById

func GetTipoFuenteFinanciamientoById(id int) (v *TipoFuenteFinanciamiento, err error)

GetTipoFuenteFinanciamientoById retrieves TipoFuenteFinanciamiento by Id. Returns error if Id doesn't exist

func (*TipoFuenteFinanciamiento) TableName

func (t *TipoFuenteFinanciamiento) TableName() string

Jump to

Keyboard shortcuts

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