models

package
v0.0.0-...-e97ab28 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULTMAXTEMS = 10000

Variables

This section is empty.

Functions

func AddComponenteResolucion

func AddComponenteResolucion(m *ComponenteResolucion) (id int64, err error)

AddComponenteResolucion insert a new ComponenteResolucion into database and returns last inserted Id on success.

func AddConjuntoVinculaciones

func AddConjuntoVinculaciones(m []VinculacionDocente) (id int64, err error)

func AddDedicacion

func AddDedicacion(m *Dedicacion) (id int64, err error)

AddDedicacion insert a new Dedicacion into database and returns last inserted Id on success.

func AddEstadoResolucion

func AddEstadoResolucion(m *EstadoResolucion) (id int64, err error)

AddEstadoResolucion insert a new EstadoResolucion into database and returns last inserted Id on success.

func AddModificacionResolucion

func AddModificacionResolucion(m *ModificacionResolucion) (id int64, err error)

AddModificacionResolucion insert a new ModificacionResolucion into database and returns last inserted Id on success.

func AddModificacionVinculacion

func AddModificacionVinculacion(m *ModificacionVinculacion) (id int64, err error)

AddModificacionVinculacion insert a new ModificacionVinculacion into database and returns last inserted Id on success.

func AddResolucion

func AddResolucion(m *Resolucion) (id int64, err error)

AddResolucion insert a new Resolucion into database and returns last inserted Id on success.

func AddResolucionEstado

func AddResolucionEstado(m *ResolucionEstado) (id int64, err error)

AddResolucionEstado insert a new ResolucionEstado into database and returns last inserted Id on success.

func AddResolucionVinculacionDocente

func AddResolucionVinculacionDocente(m *ResolucionVinculacionDocente) (id int64, err error)

AddResolucionVinculacionDocente insert a new ResolucionVinculacionDocente into database and returns last inserted Id on success.

func AddTipoResolucion

func AddTipoResolucion(m *TipoResolucion) (id int64, err error)

AddTipoResolucion insert a new TipoResolucion into database and returns last inserted Id on success.

func AddVinculacionDocente

func AddVinculacionDocente(m *VinculacionDocente) (id int64, err error)

AddVinculacionDocente insert a new VinculacionDocente into database and returns last inserted Id on success.

func DeleteComponenteResolucion

func DeleteComponenteResolucion(id int) (err error)

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

func DeleteDedicacion

func DeleteDedicacion(id int) (err error)

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

func DeleteEstadoResolucion

func DeleteEstadoResolucion(id int) (err error)

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

func DeleteModificacionResolucion

func DeleteModificacionResolucion(id int) (err error)

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

func DeleteModificacionVinculacion

func DeleteModificacionVinculacion(id int) (err error)

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

func DeleteResolucion

func DeleteResolucion(id int) (err error)

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

func DeleteResolucionEstado

func DeleteResolucionEstado(id int) (err error)

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

func DeleteResolucionVinculacionDocente

func DeleteResolucionVinculacionDocente(id int) (err error)

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

func DeleteTipoResolucion

func DeleteTipoResolucion(id int) (err error)

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

func DeleteVinculacionDocente

func DeleteVinculacionDocente(id int) (err error)

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

func GenerarResolucion

func GenerarResolucion(m *Resolucion) (id int64, err error)

func GetAllComponenteResolucion

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

GetAllComponenteResolucion retrieves all ComponenteResolucion matches certain condition. Returns empty list if no records exist

func GetAllDedicacion

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

GetAllDedicacion retrieves all Dedicacion matches certain condition. Returns empty list if no records exist

func GetAllEstadoResolucion

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

GetAllEstadoResolucion retrieves all EstadoResolucion matches certain condition. Returns empty list if no records exist

func GetAllModificacionResolucion

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

GetAllModificacionResolucion retrieves all ModificacionResolucion matches certain condition. Returns empty list if no records exist

func GetAllModificacionVinculacion

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

GetAllModificacionVinculacion retrieves all ModificacionVinculacion matches certain condition. Returns empty list if no records exist

func GetAllResolucion

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

GetAllResolucion retrieves all Resolucion matches certain condition. Returns empty list if no records exist

func GetAllResolucionEstado

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

GetAllResolucionEstado retrieves all ResolucionEstado matches certain condition. Returns empty list if no records exist

func GetAllResolucionVinculacionDocente

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

GetAllResolucionVinculacionDocente retrieves all ResolucionVinculacionDocente matches certain condition. Returns empty list if no records exist

func GetAllTipoResolucion

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

GetAllTipoResolucion retrieves all TipoResolucion matches certain condition. Returns empty list if no records exist

func GetAllVinculacionDocente

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

GetAllVinculacionDocente retrieves all VinculacionDocente matches certain condition. Returns empty list if no records exist

func GetTotalContratosXResolucion

func GetTotalContratosXResolucion(id_resolucion string, dedicacion string) (totales int, err error)

func GetValoresTotalesPorDisponibilidad

func GetValoresTotalesPorDisponibilidad(anio, periodo, id_disponibilidad string) (totales int, er error)

func RestaurarResolucion

func RestaurarResolucion(m *Resolucion) (err error)

func UpdateComponenteResolucionById

func UpdateComponenteResolucionById(m *ComponenteResolucion) (err error)

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

func UpdateDedicacionById

func UpdateDedicacionById(m *Dedicacion) (err error)

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

func UpdateEstadoResolucionById

func UpdateEstadoResolucionById(m *EstadoResolucion) (err error)

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

func UpdateModificacionResolucionById

func UpdateModificacionResolucionById(m *ModificacionResolucion) (err error)

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

func UpdateModificacionVinculacionById

func UpdateModificacionVinculacionById(m *ModificacionVinculacion) (err error)

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

func UpdateResolucionById

func UpdateResolucionById(m *Resolucion) (err error)

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

func UpdateResolucionCompletaById

func UpdateResolucionCompletaById(m *ResolucionCompleta) (outputError map[string]interface{})

func UpdateResolucionEstadoById

func UpdateResolucionEstadoById(m *ResolucionEstado) (err error)

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

func UpdateResolucionVinculacionDocenteById

func UpdateResolucionVinculacionDocenteById(m *ResolucionVinculacionDocente) (err error)

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

func UpdateTipoResolucionById

func UpdateTipoResolucionById(m *TipoResolucion) (err error)

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

func UpdateVinculacionDocenteById

func UpdateVinculacionDocenteById(m *VinculacionDocente) (err error)

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

Types

type Articulo

type Articulo struct {
	Id         int
	Numero     int
	Texto      string
	Paragrafos []Paragrafo
}

type ComponenteResolucion

type ComponenteResolucion struct {
	Id                        int                   `orm:"column(id);pk;auto"`
	Numero                    int                   `orm:"column(numero)"`
	ResolucionId              *Resolucion           `orm:"column(resolucion_id);rel(fk)"`
	Texto                     string                `orm:"column(texto)"`
	TipoComponente            string                `orm:"column(tipo_componente)"`
	ComponenteResolucionPadre *ComponenteResolucion `orm:"column(componente_resolucion_padre);rel(fk);null"`
	Activo                    bool                  `orm:"column(activo);null"`
	FechaCreacion             string                `orm:"column(fecha_creacion);type(timestamp without time zone);null"`
	FechaModificacion         string                `orm:"column(fecha_modificacion);type(timestamp without time zone);null"`
}

func GetComponenteResolucionById

func GetComponenteResolucionById(id int) (v *ComponenteResolucion, err error)

GetComponenteResolucionById retrieves ComponenteResolucion by Id. Returns error if Id doesn't exist

func (*ComponenteResolucion) TableName

func (t *ComponenteResolucion) TableName() string

type Dedicacion

type Dedicacion struct {
	Id                int    `orm:"column(id);pk;auto"`
	NombreDedicacion  string `orm:"column(nombre_dedicacion)"`
	Descripcion       string `orm:"column(descripcion);null"`
	Activo            bool   `orm:"column(activo);null"`
	FechaCreacion     string `orm:"column(fecha_creacion);type(timestamp without time zone);null"`
	FechaModificacion string `orm:"column(fecha_modificacion);type(timestamp without time zone);null"`
}

func GetDedicacionById

func GetDedicacionById(id int) (v *Dedicacion, err error)

GetDedicacionById retrieves Dedicacion by Id. Returns error if Id doesn't exist

func (*Dedicacion) TableName

func (t *Dedicacion) TableName() string

type EstadoResolucion

type EstadoResolucion struct {
	Id                int    `orm:"column(id);pk;auto"`
	NombreEstado      string `orm:"column(nombre_estado)"`
	Activo            bool   `orm:"column(activo);null"`
	FechaCreacion     string `orm:"column(fecha_creacion);type(timestamp without time zone)"`
	FechaModificacion string `orm:"column(fecha_modificacion);type(timestamp without time zone);null"`
}

func GetEstadoResolucionById

func GetEstadoResolucionById(id int) (v *EstadoResolucion, err error)

GetEstadoResolucionById retrieves EstadoResolucion by Id. Returns error if Id doesn't exist

func (*EstadoResolucion) TableName

func (t *EstadoResolucion) TableName() string

type ModificacionResolucion

type ModificacionResolucion struct {
	Id                   int         `orm:"column(id);pk;auto"`
	ResolucionNuevaId    *Resolucion `orm:"column(resolucion_nueva_id);rel(fk)"`
	ResolucionAnteriorId *Resolucion `orm:"column(resolucion_anterior_id);rel(fk)"`
	Activo               bool        `orm:"column(activo);null"`
	FechaCreacion        string      `orm:"column(fecha_creacion);type(timestamp without time zone);null"`
	FechaModificacion    string      `orm:"column(fecha_modificacion);type(timestamp without time zone);null"`
}

func GetModificacionResolucionById

func GetModificacionResolucionById(id int) (v *ModificacionResolucion, err error)

GetModificacionResolucionById retrieves ModificacionResolucion by Id. Returns error if Id doesn't exist

func (*ModificacionResolucion) TableName

func (t *ModificacionResolucion) TableName() string

type ModificacionVinculacion

type ModificacionVinculacion struct {
	Id                             int                     `orm:"column(id);pk;auto"`
	ModificacionResolucionId       *ModificacionResolucion `orm:"column(modificacion_resolucion_id);rel(fk)"`
	VinculacionDocenteCanceladaId  *VinculacionDocente     `orm:"column(vinculacion_docente_cancelada_id);rel(fk)"`
	VinculacionDocenteRegistradaId *VinculacionDocente     `orm:"column(vinculacion_docente_registrada_id);rel(fk);null"`
	Horas                          float64                 `orm:"column(horas);null"`
	Activo                         bool                    `orm:"column(activo);null"`
	FechaCreacion                  string                  `orm:"column(fecha_creacion);type(timestamp without time zone);null"`
	FechaModificacion              string                  `orm:"column(fecha_modificacion);type(timestamp without time zone);null"`
}

func GetModificacionVinculacionById

func GetModificacionVinculacionById(id int) (v *ModificacionVinculacion, err error)

GetModificacionVinculacionById retrieves ModificacionVinculacion by Id. Returns error if Id doesn't exist

func (*ModificacionVinculacion) TableName

func (t *ModificacionVinculacion) TableName() string

type Operation

type Operation struct {
	Field string
	Op    string
}

type Paragrafo

type Paragrafo struct {
	Id     int
	Numero int
	Texto  string
}

type Resolucion

type Resolucion struct {
	Id                      int             `orm:"column(id);pk;auto"`
	NumeroResolucion        string          `orm:"column(numero_resolucion)"`
	FechaExpedicion         time.Time       `orm:"column(fecha_expedicion);type(timestamp without time zone);null"`
	Vigencia                int             `orm:"column(vigencia)"`
	DependenciaId           int             `orm:"column(dependencia_id)"`
	TipoResolucionId        *TipoResolucion `orm:"column(tipo_resolucion_id);rel(fk)"`
	PreambuloResolucion     string          `orm:"column(preambulo_resolucion)"`
	ConsideracionResolucion string          `orm:"column(consideracion_resolucion)"`
	NumeroSemanas           int             `orm:"column(numero_semanas)"`
	Periodo                 int             `orm:"column(periodo)"`
	Titulo                  string          `orm:"column(titulo);null"`
	DependenciaFirmaId      int             `orm:"column(dependencia_firma_id);null"`
	VigenciaCarga           int             `orm:"column(vigencia_carga);null"`
	PeriodoCarga            int             `orm:"column(periodo_carga);null"`
	CuadroResponsabilidades string          `orm:"column(cuadro_responsabilidades);type(json);null"`
	Activo                  bool            `orm:"column(activo);null"`
	FechaCreacion           string          `orm:"column(fecha_creacion);type(timestamp without time zone)"`
	FechaModificacion       string          `orm:"column(fecha_modificacion);type(timestamp without time zone);null"`
}

func GetResolucionById

func GetResolucionById(id int) (v *Resolucion, err error)

GetResolucionById retrieves Resolucion by Id. Returns error if Id doesn't exist

func (*Resolucion) TableName

func (t *Resolucion) TableName() string

type ResolucionCompleta

type ResolucionCompleta struct {
	Vinculacion             ResolucionVinculacionDocente
	Consideracion           string
	Preambulo               string
	Vigencia                int
	Numero                  string
	Id                      int
	Articulos               []Articulo
	Titulo                  string
	CuadroResponsabilidades string
}

func GetOneResolucionCompleta

func GetOneResolucionCompleta(idResolucion string) (resolucion ResolucionCompleta, outputError map[string]interface{})

func GetTemplateResolucion

func GetTemplateResolucion(dedicacion string, nivel string) (res ResolucionCompleta, err error)

no se usaba periodo y tipo entonces se eliminaron func GetTemplateResolucion(dedicacion, nivel, periodo, tipo string) (res ResolucionCompleta, err error) {

type ResolucionEstado

type ResolucionEstado struct {
	Id                 int               `orm:"column(id);pk;auto"`
	Usuario            string            `orm:"column(usuario);null"`
	EstadoResolucionId *EstadoResolucion `orm:"column(estado_resolucion_id);rel(fk)"`
	ResolucionId       *Resolucion       `orm:"column(resolucion_id);rel(fk)"`
	Activo             bool              `orm:"column(activo);null"`
	FechaCreacion      string            `orm:"column(fecha_creacion);type(timestamp without time zone)"`
	FechaModificacion  string            `orm:"column(fecha_modificacion);type(timestamp without time zone);null"`
}

func GetResolucionEstadoById

func GetResolucionEstadoById(id int) (v *ResolucionEstado, err error)

GetResolucionEstadoById retrieves ResolucionEstado by Id. Returns error if Id doesn't exist

func (*ResolucionEstado) TableName

func (t *ResolucionEstado) TableName() string

type ResolucionVinculacion

type ResolucionVinculacion struct {
	Id                 int       `orm:"column(id);pk;auto"`
	Estado             string    `orm:"column(estado)"`
	Numero             string    `orm:"column(numero)"`
	Vigencia           int       `orm:"column(vigencia)"`
	Facultad           int       `orm:"column(facultad)"`
	NivelAcademico     string    `orm:"column(nivel_academico)"`
	Dedicacion         string    `orm:"column(dedicacion)"`
	FechaExpedicion    time.Time `orm:"column(fecha_expedicion);type(timestamp without time zone)"`
	NumeroSemanas      int       `orm:"column(numero_semanas)"`
	Periodo            int       `orm:"column(periodo)"`
	TipoResolucion     string    `orm:"column(tipo_resolucion)"`
	IdDependenciaFirma int       `orm:"column(dependencia_firma)"`
	PeriodoCarga       int       `orm:"column(periodo_carga)"`
	VigenciaCarga      int       `orm:"column(vigencia_carga)"`
}

func GetAllExpedidasVigenciaPeriodo

func GetAllExpedidasVigenciaPeriodo(vigencia int) (arregloIDs []ResolucionVinculacion, outputError map[string]interface{})

func GetAllExpedidasVigenciaPeriodoVinculacion

func GetAllExpedidasVigenciaPeriodoVinculacion(vigencia int) (arregloIDs []ResolucionVinculacion, outputError map[string]interface{})

func GetAllResolucionAprobada

func GetAllResolucionAprobada(query map[string]string, offset int64, limit int64) (arregloIDs []ResolucionVinculacion, outputError map[string]interface{})

Hay parametros que no se usan y se eliminan fields, stortBy y order func GetAllResolucionAprobada(query map[string]string, fields []string, sortby []string, order []string,

func GetAllResolucionVinculacion

func GetAllResolucionVinculacion(query map[string]string, offset int64, limit int64) (ml []ResolucionVinculacion, outputError map[string]interface{})

se quita fields, stortBy y order porque no se usan func GetAllResolucionVinculacion(query map[string]string, fields []string, sortby []string, order []string,

type ResolucionVinculacionDocente

type ResolucionVinculacionDocente struct {
	Id                int    `orm:"column(id);pk;auto"`
	FacultadId        int    `orm:"column(facultad_id)"`
	Dedicacion        string `orm:"column(dedicacion)"`
	NivelAcademico    string `orm:"column(nivel_academico)"`
	Activo            bool   `orm:"column(activo);null"`
	FechaCreacion     string `orm:"column(fecha_creacion);type(timestamp without time zone);null"`
	FechaModificacion string `orm:"column(fecha_modificacion);type(timestamp without time zone);null"`
}

func GetResolucionVinculacionDocenteById

func GetResolucionVinculacionDocenteById(id int) (v *ResolucionVinculacionDocente, err error)

GetResolucionVinculacionDocenteById retrieves ResolucionVinculacionDocente by Id. Returns error if Id doesn't exist

func (*ResolucionVinculacionDocente) TableName

func (t *ResolucionVinculacionDocente) TableName() string

type TipoResolucion

type TipoResolucion struct {
	Id                   int    `orm:"column(id);pk;auto"`
	NombreTipoResolucion string `orm:"column(nombre_tipo_resolucion)"`
	Descripcion          string `orm:"column(descripcion);null"`
	Activo               bool   `orm:"column(activo);null"`
	FechaCreacion        string `orm:"column(fecha_creacion);type(timestamp without time zone);null"`
	FechaModificacion    string `orm:"column(fecha_modificacion);type(timestamp without time zone);null"`
}

func GetTipoResolucionById

func GetTipoResolucionById(id int) (v *TipoResolucion, err error)

GetTipoResolucionById retrieves TipoResolucion by Id. Returns error if Id doesn't exist

func (*TipoResolucion) TableName

func (t *TipoResolucion) TableName() string

type VinculacionDocente

type VinculacionDocente struct {
	Id                             int                           `orm:"column(id);pk;auto"`
	NumeroContrato                 string                        `orm:"column(numero_contrato);null"`
	Vigencia                       int                           `orm:"column(vigencia);null"`
	PersonaId                      float64                       `orm:"column(persona_id)"`
	NumeroHorasSemanales           int                           `orm:"column(numero_horas_semanales)"`
	NumeroSemanas                  int                           `orm:"column(numero_semanas)"`
	PuntoSalarialId                int                           `orm:"column(punto_salarial_id);null"`
	SalarioMinimoId                int                           `orm:"column(salario_minimo_id);null"`
	ResolucionVinculacionDocenteId *ResolucionVinculacionDocente `orm:"column(resolucion_vinculacion_docente_id);rel(fk)"`
	DedicacionId                   *Dedicacion                   `orm:"column(dedicacion_id);rel(fk)"`
	ProyectoCurricularId           int16                         `orm:"column(proyecto_curricular_id)"`
	ValorContrato                  float64                       `orm:"column(valor_contrato);null"`
	Categoria                      string                        `orm:"column(categoria);null"`
	Disponibilidad                 int                           `orm:"column(disponibilidad);null"`
	DependenciaAcademica           int                           `orm:"column(dependencia_academica);null"`
	NumeroRp                       float64                       `orm:"column(numero_rp);null"`
	VigenciaRp                     float64                       `orm:"column(vigencia_rp);null"`
	FechaInicio                    time.Time                     `orm:"column(fecha_inicio);type(timestamp without time zone);null"`
	Activo                         bool                          `orm:"column(activo);null"`
	FechaCreacion                  string                        `orm:"column(fecha_creacion);type(timestamp without time zone)"`
	FechaModificacion              string                        `orm:"column(fecha_modificacion);type(timestamp without time zone);null"`
}

func GetVinculacionDocenteById

func GetVinculacionDocenteById(id int) (v *VinculacionDocente, err error)

GetVinculacionDocenteById retrieves VinculacionDocente by Id. Returns error if Id doesn't exist

func GetVinculacionesAgrupadas

func GetVinculacionesAgrupadas(id string) (v []VinculacionDocente, er error)

func (*VinculacionDocente) TableName

func (t *VinculacionDocente) TableName() string

Jump to

Keyboard shortcuts

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