|
@ -1,9 +1,54 @@ |
|
|
from django.db import models |
|
|
from django.db import models |
|
|
|
|
|
|
|
|
from comissoes.models import Comissao |
|
|
from comissoes.models import Comissao |
|
|
from norma.models import NormaJuridica |
|
|
from parlamentares.models import Parlamentar, Partido |
|
|
from parlamentares.models import Parlamentar |
|
|
|
|
|
from parlamentares.models import Partido |
|
|
|
|
|
|
|
|
class TipoMateriaLegislativa(models.Model): |
|
|
|
|
|
tip_materia = models.AutoField(primary_key=True) |
|
|
|
|
|
sgl_tipo_materia = models.CharField(max_length=5) |
|
|
|
|
|
des_tipo_materia = models.CharField(max_length=50) |
|
|
|
|
|
ind_num_automatica = models.IntegerField() |
|
|
|
|
|
quorum_minimo_votacao = models.IntegerField() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class RegimeTramitacao(models.Model): |
|
|
|
|
|
cod_regime_tramitacao = models.AutoField(primary_key=True) |
|
|
|
|
|
des_regime_tramitacao = models.CharField(max_length=50) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Origem(models.Model): |
|
|
|
|
|
cod_origem = models.AutoField(primary_key=True) |
|
|
|
|
|
sgl_origem = models.CharField(max_length=10) |
|
|
|
|
|
nom_origem = models.CharField(max_length=50) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MateriaLegislativa(models.Model): |
|
|
|
|
|
cod_materia = models.AutoField(primary_key=True) |
|
|
|
|
|
tip_id_basica = models.ForeignKey(TipoMateriaLegislativa) |
|
|
|
|
|
num_protocolo = models.IntegerField(blank=True, null=True) |
|
|
|
|
|
num_ident_basica = models.IntegerField() |
|
|
|
|
|
ano_ident_basica = models.SmallIntegerField() |
|
|
|
|
|
dat_apresentacao = models.DateField(blank=True, null=True) |
|
|
|
|
|
tip_apresentacao = models.CharField(max_length=1, blank=True, null=True) |
|
|
|
|
|
regime_tramitacao = models.ForeignKey(RegimeTramitacao) |
|
|
|
|
|
dat_publicacao = models.DateField(blank=True, null=True) |
|
|
|
|
|
tip_origem_externa = models.ForeignKey(TipoMateriaLegislativa, blank=True, null=True) |
|
|
|
|
|
num_origem_externa = models.CharField(max_length=5, blank=True, null=True) |
|
|
|
|
|
ano_origem_externa = models.SmallIntegerField(blank=True, null=True) |
|
|
|
|
|
dat_origem_externa = models.DateField(blank=True, null=True) |
|
|
|
|
|
local_origem_externa = models.ForeignKey(Origem, blank=True, null=True) |
|
|
|
|
|
nom_apelido = models.CharField(max_length=50, blank=True, null=True) |
|
|
|
|
|
num_dias_prazo = models.IntegerField(blank=True, null=True) |
|
|
|
|
|
dat_fim_prazo = models.DateField(blank=True, null=True) |
|
|
|
|
|
ind_tramitacao = models.IntegerField() |
|
|
|
|
|
ind_polemica = models.IntegerField(blank=True, null=True) |
|
|
|
|
|
des_objeto = models.CharField(max_length=150, blank=True, null=True) |
|
|
|
|
|
ind_complementar = models.IntegerField(blank=True, null=True) |
|
|
|
|
|
txt_ementa = models.TextField() |
|
|
|
|
|
txt_indexacao = models.TextField(blank=True, null=True) |
|
|
|
|
|
txt_observacao = models.TextField(blank=True, null=True) |
|
|
|
|
|
txt_resultado = models.TextField(blank=True, null=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class AcompMateria(models.Model): |
|
|
class AcompMateria(models.Model): |
|
@ -26,6 +71,11 @@ class AssuntoMateria(models.Model): |
|
|
des_dispositivo = models.CharField(max_length=50) |
|
|
des_dispositivo = models.CharField(max_length=50) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TipoAutor(models.Model): |
|
|
|
|
|
tip_autor = models.IntegerField(primary_key=True) |
|
|
|
|
|
des_tipo_autor = models.CharField(max_length=50) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Autor(models.Model): |
|
|
class Autor(models.Model): |
|
|
cod_autor = models.AutoField(primary_key=True) |
|
|
cod_autor = models.AutoField(primary_key=True) |
|
|
partido = models.ForeignKey(Partido, blank=True, null=True) |
|
|
partido = models.ForeignKey(Partido, blank=True, null=True) |
|
@ -49,6 +99,11 @@ class DespachoInicial(models.Model): |
|
|
comissao = models.ForeignKey(Comissao) |
|
|
comissao = models.ForeignKey(Comissao) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TipoDocumento(models.Model): |
|
|
|
|
|
tip_documento = models.AutoField(primary_key=True) |
|
|
|
|
|
des_tipo_documento = models.CharField(max_length=50) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DocumentoAcessorio(models.Model): |
|
|
class DocumentoAcessorio(models.Model): |
|
|
cod_documento = models.AutoField(primary_key=True) |
|
|
cod_documento = models.AutoField(primary_key=True) |
|
|
materia = models.ForeignKey(MateriaLegislativa) |
|
|
materia = models.ForeignKey(MateriaLegislativa) |
|
@ -60,57 +115,11 @@ class DocumentoAcessorio(models.Model): |
|
|
txt_indexacao = models.TextField(blank=True, null=True) |
|
|
txt_indexacao = models.TextField(blank=True, null=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class LegislacaoCitada(models.Model): |
|
|
|
|
|
materia = models.ForeignKey(MateriaLegislativa) |
|
|
|
|
|
norma = models.ForeignKey(NormaJuridica) |
|
|
|
|
|
des_disposicoes = models.CharField(max_length=15, blank=True, null=True) |
|
|
|
|
|
des_parte = models.CharField(max_length=8, blank=True, null=True) |
|
|
|
|
|
des_livro = models.CharField(max_length=7, blank=True, null=True) |
|
|
|
|
|
des_titulo = models.CharField(max_length=7, blank=True, null=True) |
|
|
|
|
|
des_capitulo = models.CharField(max_length=7, blank=True, null=True) |
|
|
|
|
|
des_secao = models.CharField(max_length=7, blank=True, null=True) |
|
|
|
|
|
des_subsecao = models.CharField(max_length=7, blank=True, null=True) |
|
|
|
|
|
des_artigo = models.CharField(max_length=4, blank=True, null=True) |
|
|
|
|
|
des_paragrafo = models.CharField(max_length=3, blank=True, null=True) |
|
|
|
|
|
des_inciso = models.CharField(max_length=10, blank=True, null=True) |
|
|
|
|
|
des_alinea = models.CharField(max_length=3, blank=True, null=True) |
|
|
|
|
|
des_item = models.CharField(max_length=3, blank=True, null=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MateriaAssunto(models.Model): |
|
|
class MateriaAssunto(models.Model): |
|
|
assunto = models.ForeignKey(AssuntoMateria) |
|
|
assunto = models.ForeignKey(AssuntoMateria) |
|
|
materia = models.ForeignKey(MateriaLegislativa) |
|
|
materia = models.ForeignKey(MateriaLegislativa) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MateriaLegislativa(models.Model): |
|
|
|
|
|
cod_materia = models.AutoField(primary_key=True) |
|
|
|
|
|
tip_id_basica = models.ForeignKey(TipoMateriaLegislativa) |
|
|
|
|
|
num_protocolo = models.IntegerField(blank=True, null=True) |
|
|
|
|
|
num_ident_basica = models.IntegerField() |
|
|
|
|
|
ano_ident_basica = models.SmallIntegerField() |
|
|
|
|
|
dat_apresentacao = models.DateField(blank=True, null=True) |
|
|
|
|
|
tip_apresentacao = models.CharField(max_length=1, blank=True, null=True) |
|
|
|
|
|
regime_tramitacao = models.ForeignKey(RegimeTramitacao) |
|
|
|
|
|
dat_publicacao = models.DateField(blank=True, null=True) |
|
|
|
|
|
tip_origem_externa = models.ForeignKey(TipoMateriaLegislativa, blank=True, null=True) |
|
|
|
|
|
num_origem_externa = models.CharField(max_length=5, blank=True, null=True) |
|
|
|
|
|
ano_origem_externa = models.SmallIntegerField(blank=True, null=True) |
|
|
|
|
|
dat_origem_externa = models.DateField(blank=True, null=True) |
|
|
|
|
|
local_origem_externa = models.ForeignKey(Origem, blank=True, null=True) |
|
|
|
|
|
nom_apelido = models.CharField(max_length=50, blank=True, null=True) |
|
|
|
|
|
num_dias_prazo = models.IntegerField(blank=True, null=True) |
|
|
|
|
|
dat_fim_prazo = models.DateField(blank=True, null=True) |
|
|
|
|
|
ind_tramitacao = models.IntegerField() |
|
|
|
|
|
ind_polemica = models.IntegerField(blank=True, null=True) |
|
|
|
|
|
des_objeto = models.CharField(max_length=150, blank=True, null=True) |
|
|
|
|
|
ind_complementar = models.IntegerField(blank=True, null=True) |
|
|
|
|
|
txt_ementa = models.TextField() |
|
|
|
|
|
txt_indexacao = models.TextField(blank=True, null=True) |
|
|
|
|
|
txt_observacao = models.TextField(blank=True, null=True) |
|
|
|
|
|
|
|
|
|
|
|
txt_resultado = models.TextField(blank=True, null=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Numeracao(models.Model): |
|
|
class Numeracao(models.Model): |
|
|
materia = models.ForeignKey(MateriaLegislativa) |
|
|
materia = models.ForeignKey(MateriaLegislativa) |
|
|
num_ordem = models.IntegerField() |
|
|
num_ordem = models.IntegerField() |
|
@ -129,10 +138,19 @@ class Orgao(models.Model): |
|
|
num_tel_orgao = models.CharField(max_length=50, blank=True, null=True) |
|
|
num_tel_orgao = models.CharField(max_length=50, blank=True, null=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Origem(models.Model): |
|
|
class TipoFimRelatoria(models.Model): |
|
|
cod_origem = models.AutoField(primary_key=True) |
|
|
tip_fim_relatoria = models.AutoField(primary_key=True) |
|
|
sgl_origem = models.CharField(max_length=10) |
|
|
des_fim_relatoria = models.CharField(max_length=50) |
|
|
nom_origem = models.CharField(max_length=50) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Relatoria(models.Model): |
|
|
|
|
|
cod_relatoria = models.AutoField(primary_key=True) |
|
|
|
|
|
materia = models.ForeignKey(MateriaLegislativa) |
|
|
|
|
|
parlamentar = models.ForeignKey(Parlamentar) |
|
|
|
|
|
tip_fim_relatoria = models.ForeignKey(TipoFimRelatoria, blank=True, null=True) |
|
|
|
|
|
comissao = models.ForeignKey(Comissao, blank=True, null=True) |
|
|
|
|
|
dat_desig_relator = models.DateField() |
|
|
|
|
|
dat_destit_relator = models.DateField(blank=True, null=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Parecer(models.Model): |
|
|
class Parecer(models.Model): |
|
@ -143,6 +161,14 @@ class Parecer(models.Model): |
|
|
txt_parecer = models.TextField(blank=True, null=True) |
|
|
txt_parecer = models.TextField(blank=True, null=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TipoProposicao(models.Model): |
|
|
|
|
|
tip_proposicao = models.AutoField(primary_key=True) |
|
|
|
|
|
des_tipo_proposicao = models.CharField(max_length=50) |
|
|
|
|
|
ind_mat_ou_doc = models.CharField(max_length=1) |
|
|
|
|
|
tip_mat_ou_doc = models.IntegerField() |
|
|
|
|
|
nom_modelo = models.CharField(max_length=50) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Proposicao(models.Model): |
|
|
class Proposicao(models.Model): |
|
|
cod_proposicao = models.AutoField(primary_key=True) |
|
|
cod_proposicao = models.AutoField(primary_key=True) |
|
|
materia = models.ForeignKey(MateriaLegislativa, blank=True, null=True) |
|
|
materia = models.ForeignKey(MateriaLegislativa, blank=True, null=True) |
|
@ -157,21 +183,6 @@ class Proposicao(models.Model): |
|
|
num_proposicao = models.IntegerField(blank=True, null=True) |
|
|
num_proposicao = models.IntegerField(blank=True, null=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class RegimeTramitacao(models.Model): |
|
|
|
|
|
cod_regime_tramitacao = models.AutoField(primary_key=True) |
|
|
|
|
|
des_regime_tramitacao = models.CharField(max_length=50) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Relatoria(models.Model): |
|
|
|
|
|
cod_relatoria = models.AutoField(primary_key=True) |
|
|
|
|
|
materia = models.ForeignKey(MateriaLegislativa) |
|
|
|
|
|
parlamentar = models.ForeignKey(Parlamentar) |
|
|
|
|
|
tip_fim_relatoria = models.ForeignKey(TipoFimRelatoria, blank=True, null=True) |
|
|
|
|
|
comissao = models.ForeignKey(Comissao, blank=True, null=True) |
|
|
|
|
|
dat_desig_relator = models.DateField() |
|
|
|
|
|
dat_destit_relator = models.DateField(blank=True, null=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class StatusTramitacao(models.Model): |
|
|
class StatusTramitacao(models.Model): |
|
|
cod_status = models.AutoField(primary_key=True) |
|
|
cod_status = models.AutoField(primary_key=True) |
|
|
sgl_status = models.CharField(max_length=10) |
|
|
sgl_status = models.CharField(max_length=10) |
|
@ -180,35 +191,11 @@ class StatusTramitacao(models.Model): |
|
|
ind_retorno_tramitacao = models.IntegerField() |
|
|
ind_retorno_tramitacao = models.IntegerField() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TipoAutor(models.Model): |
|
|
class UnidadeTramitacao(models.Model): |
|
|
tip_autor = models.IntegerField(primary_key=True) |
|
|
cod_unid_tramitacao = models.AutoField(primary_key=True) |
|
|
des_tipo_autor = models.CharField(max_length=50) |
|
|
comissao = models.ForeignKey(Comissao, blank=True, null=True) |
|
|
|
|
|
orgao = models.ForeignKey(Orgao, blank=True, null=True) |
|
|
|
|
|
parlamentar = models.ForeignKey(Parlamentar, blank=True, null=True) |
|
|
class TipoDocumento(models.Model): |
|
|
|
|
|
tip_documento = models.AutoField(primary_key=True) |
|
|
|
|
|
des_tipo_documento = models.CharField(max_length=50) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TipoFimRelatoria(models.Model): |
|
|
|
|
|
tip_fim_relatoria = models.AutoField(primary_key=True) |
|
|
|
|
|
des_fim_relatoria = models.CharField(max_length=50) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TipoMateriaLegislativa(models.Model): |
|
|
|
|
|
tip_materia = models.AutoField(primary_key=True) |
|
|
|
|
|
sgl_tipo_materia = models.CharField(max_length=5) |
|
|
|
|
|
des_tipo_materia = models.CharField(max_length=50) |
|
|
|
|
|
ind_num_automatica = models.IntegerField() |
|
|
|
|
|
quorum_minimo_votacao = models.IntegerField() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TipoProposicao(models.Model): |
|
|
|
|
|
tip_proposicao = models.AutoField(primary_key=True) |
|
|
|
|
|
des_tipo_proposicao = models.CharField(max_length=50) |
|
|
|
|
|
ind_mat_ou_doc = models.CharField(max_length=1) |
|
|
|
|
|
tip_mat_ou_doc = models.IntegerField() |
|
|
|
|
|
nom_modelo = models.CharField(max_length=50) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Tramitacao(models.Model): |
|
|
class Tramitacao(models.Model): |
|
@ -224,11 +211,3 @@ class Tramitacao(models.Model): |
|
|
sgl_turno = models.CharField(max_length=1, blank=True, null=True) |
|
|
sgl_turno = models.CharField(max_length=1, blank=True, null=True) |
|
|
txt_tramitacao = models.TextField(blank=True, null=True) |
|
|
txt_tramitacao = models.TextField(blank=True, null=True) |
|
|
dat_fim_prazo = models.DateField(blank=True, null=True) |
|
|
dat_fim_prazo = models.DateField(blank=True, null=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class UnidadeTramitacao(models.Model): |
|
|
|
|
|
cod_unid_tramitacao = models.AutoField(primary_key=True) |
|
|
|
|
|
comissao = models.ForeignKey(Comissao, blank=True, null=True) |
|
|
|
|
|
orgao = models.ForeignKey(Orgao, blank=True, null=True) |
|
|
|
|
|
parlamentar = models.ForeignKey(Parlamentar, blank=True, null=True) |
|
|
|
|
|
|
|
|
|
|
|