Browse Source

Move mesa to parlamentares app and adjust its fields

pull/6/head
Marcio Mazza 10 years ago
parent
commit
52bfa2e867
  1. 15
      comissoes/models.py
  2. 34
      materia/models.py
  3. 0
      mesa/__init__.py
  4. 3
      mesa/admin.py
  5. 0
      mesa/migrations/__init__.py
  6. 31
      mesa/models.py
  7. 3
      mesa/tests.py
  8. 3
      mesa/views.py
  9. 3
      norma/models.py
  10. 104
      parlamentares/models.py
  11. 5
      protocoloadm/models.py
  12. 1
      sapl/settings.py
  13. 31
      sessao/models.py

15
comissoes/models.py

@ -1,11 +1,12 @@
from django.db import models from django.db import models
from parlamentares.models import Parlamentar
class CargoComissao(models.Model): class CargoComissao(models.Model):
cod_cargo = models.AutoField(primary_key=True) ###
des_cargo = models.CharField(max_length=50) nome = models.CharField(max_length=50)
ind_unico = models.IntegerField() ind_unico = models.IntegerField()
ind_excluido = models.IntegerField()
class Comissao(models.Model): class Comissao(models.Model):
@ -30,28 +31,25 @@ class Comissao(models.Model):
txt_finalidade = models.TextField(blank=True, null=True) txt_finalidade = models.TextField(blank=True, null=True)
end_email = models.CharField(max_length=100, blank=True, null=True) end_email = models.CharField(max_length=100, blank=True, null=True)
ind_unid_deliberativa = models.IntegerField() ind_unid_deliberativa = models.IntegerField()
ind_excluido = models.IntegerField()
class ComposicaoComissao(models.Model): class ComposicaoComissao(models.Model):
cod_comp_comissao = models.AutoField(primary_key=True) cod_comp_comissao = models.AutoField(primary_key=True)
cod_parlamentar = models.IntegerField() parlamentar = models.ForeignKey(Parlamentar)
cod_comissao = models.IntegerField() cod_comissao = models.IntegerField()
cod_periodo_comp = models.IntegerField() cod_periodo_comp = models.IntegerField()
cod_cargo = models.IntegerField() cargo = models.ForeignKey(CargoComissao)
ind_titular = models.IntegerField() ind_titular = models.IntegerField()
dat_designacao = models.DateField() dat_designacao = models.DateField()
dat_desligamento = models.DateField(blank=True, null=True) dat_desligamento = models.DateField(blank=True, null=True)
des_motivo_desligamento = models.CharField(max_length=150, blank=True, null=True) des_motivo_desligamento = models.CharField(max_length=150, blank=True, null=True)
obs_composicao = models.CharField(max_length=150, blank=True, null=True) obs_composicao = models.CharField(max_length=150, blank=True, null=True)
ind_excluido = models.IntegerField()
class PeriodoCompComissao(models.Model): class PeriodoCompComissao(models.Model):
cod_periodo_comp = models.AutoField(primary_key=True) cod_periodo_comp = models.AutoField(primary_key=True)
dat_inicio_periodo = models.DateField() dat_inicio_periodo = models.DateField()
dat_fim_periodo = models.DateField(blank=True, null=True) dat_fim_periodo = models.DateField(blank=True, null=True)
ind_excluido = models.IntegerField()
class TipoComissao(models.Model): class TipoComissao(models.Model):
@ -60,4 +58,3 @@ class TipoComissao(models.Model):
sgl_natureza_comissao = models.CharField(max_length=1) sgl_natureza_comissao = models.CharField(max_length=1)
sgl_tipo_comissao = models.CharField(max_length=10) sgl_tipo_comissao = models.CharField(max_length=10)
des_dispositivo_regimental = models.CharField(max_length=50, blank=True, null=True) des_dispositivo_regimental = models.CharField(max_length=50, blank=True, null=True)
ind_excluido = models.IntegerField()

34
materia/models.py

@ -1,12 +1,13 @@
from django.db import models from django.db import models
from parlamentares.models import Parlamentar
class AcompMateria(models.Model): class AcompMateria(models.Model):
cod_cadastro = models.AutoField(primary_key=True) cod_cadastro = models.AutoField(primary_key=True)
cod_materia = models.IntegerField() cod_materia = models.IntegerField()
end_email = models.CharField(max_length=100) end_email = models.CharField(max_length=100)
txt_hash = models.CharField(max_length=8) txt_hash = models.CharField(max_length=8)
ind_excluido = models.IntegerField()
class Anexada(models.Model): class Anexada(models.Model):
@ -14,40 +15,35 @@ class Anexada(models.Model):
cod_materia_anexada = models.IntegerField() cod_materia_anexada = models.IntegerField()
dat_anexacao = models.DateField() dat_anexacao = models.DateField()
dat_desanexacao = models.DateField(blank=True, null=True) dat_desanexacao = models.DateField(blank=True, null=True)
ind_excluido = models.IntegerField()
class AssuntoMateria(models.Model): class AssuntoMateria(models.Model):
cod_assunto = models.IntegerField(primary_key=True) cod_assunto = models.IntegerField(primary_key=True)
des_assunto = models.CharField(max_length=200) des_assunto = models.CharField(max_length=200)
des_dispositivo = models.CharField(max_length=50) des_dispositivo = models.CharField(max_length=50)
ind_excluido = models.IntegerField()
class Autor(models.Model): class Autor(models.Model):
cod_autor = models.AutoField(primary_key=True) cod_autor = models.AutoField(primary_key=True)
cod_partido = models.IntegerField(blank=True, null=True) cod_partido = models.IntegerField(blank=True, null=True)
cod_comissao = models.IntegerField(blank=True, null=True) cod_comissao = models.IntegerField(blank=True, null=True)
cod_parlamentar = models.IntegerField(blank=True, null=True) parlamentar = models.ForeignKey(Parlamentar, blank=True, null=True)
tip_autor = models.IntegerField() tip_autor = models.IntegerField()
nom_autor = models.CharField(max_length=50, blank=True, null=True) nom_autor = models.CharField(max_length=50, blank=True, null=True)
des_cargo = models.CharField(max_length=50, blank=True, null=True) des_cargo = models.CharField(max_length=50, blank=True, null=True)
col_username = models.CharField(max_length=50, blank=True, null=True) col_username = models.CharField(max_length=50, blank=True, null=True)
ind_excluido = models.IntegerField()
class Autoria(models.Model): class Autoria(models.Model):
cod_autor = models.IntegerField() cod_autor = models.IntegerField()
cod_materia = models.IntegerField() cod_materia = models.IntegerField()
ind_primeiro_autor = models.IntegerField() ind_primeiro_autor = models.IntegerField()
ind_excluido = models.IntegerField()
class DespachoInicial(models.Model): class DespachoInicial(models.Model):
cod_materia = models.IntegerField() cod_materia = models.IntegerField()
num_ordem = models.IntegerField() num_ordem = models.IntegerField()
cod_comissao = models.IntegerField() cod_comissao = models.IntegerField()
ind_excluido = models.IntegerField()
class DocumentoAcessorio(models.Model): class DocumentoAcessorio(models.Model):
@ -59,7 +55,6 @@ class DocumentoAcessorio(models.Model):
nom_autor_documento = models.CharField(max_length=50, blank=True, null=True) nom_autor_documento = models.CharField(max_length=50, blank=True, null=True)
txt_ementa = models.TextField(blank=True, null=True) txt_ementa = models.TextField(blank=True, null=True)
txt_indexacao = models.TextField(blank=True, null=True) txt_indexacao = models.TextField(blank=True, null=True)
ind_excluido = models.IntegerField()
class LegislacaoCitada(models.Model): class LegislacaoCitada(models.Model):
@ -77,13 +72,11 @@ class LegislacaoCitada(models.Model):
des_inciso = models.CharField(max_length=10, 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_alinea = models.CharField(max_length=3, blank=True, null=True)
des_item = models.CharField(max_length=3, blank=True, null=True) des_item = models.CharField(max_length=3, blank=True, null=True)
ind_excluido = models.IntegerField()
class MateriaAssunto(models.Model): class MateriaAssunto(models.Model):
cod_assunto = models.IntegerField() cod_assunto = models.IntegerField()
cod_materia = models.IntegerField() cod_materia = models.IntegerField()
ind_excluido = models.IntegerField()
class MateriaLegislativa(models.Model): class MateriaLegislativa(models.Model):
@ -111,7 +104,7 @@ class MateriaLegislativa(models.Model):
txt_ementa = models.TextField() txt_ementa = models.TextField()
txt_indexacao = models.TextField(blank=True, null=True) txt_indexacao = models.TextField(blank=True, null=True)
txt_observacao = models.TextField(blank=True, null=True) txt_observacao = models.TextField(blank=True, null=True)
ind_excluido = models.IntegerField()
txt_resultado = models.TextField(blank=True, null=True) txt_resultado = models.TextField(blank=True, null=True)
@ -122,7 +115,6 @@ class Numeracao(models.Model):
num_materia = models.CharField(max_length=5) num_materia = models.CharField(max_length=5)
ano_materia = models.SmallIntegerField() ano_materia = models.SmallIntegerField()
dat_materia = models.DateField(blank=True, null=True) dat_materia = models.DateField(blank=True, null=True)
ind_excluido = models.IntegerField()
class Orgao(models.Model): class Orgao(models.Model):
@ -132,14 +124,12 @@ class Orgao(models.Model):
ind_unid_deliberativa = models.IntegerField() ind_unid_deliberativa = models.IntegerField()
end_orgao = models.CharField(max_length=100, blank=True, null=True) end_orgao = models.CharField(max_length=100, blank=True, null=True)
num_tel_orgao = models.CharField(max_length=50, blank=True, null=True) num_tel_orgao = models.CharField(max_length=50, blank=True, null=True)
ind_excluido = models.IntegerField()
class Origem(models.Model): class Origem(models.Model):
cod_origem = models.AutoField(primary_key=True) cod_origem = models.AutoField(primary_key=True)
sgl_origem = models.CharField(max_length=10) sgl_origem = models.CharField(max_length=10)
nom_origem = models.CharField(max_length=50) nom_origem = models.CharField(max_length=50)
ind_excluido = models.IntegerField()
class Parecer(models.Model): class Parecer(models.Model):
@ -148,7 +138,6 @@ class Parecer(models.Model):
tip_conclusao = models.CharField(max_length=3, blank=True, null=True) tip_conclusao = models.CharField(max_length=3, blank=True, null=True)
tip_apresentacao = models.CharField(max_length=1) tip_apresentacao = models.CharField(max_length=1)
txt_parecer = models.TextField(blank=True, null=True) txt_parecer = models.TextField(blank=True, null=True)
ind_excluido = models.IntegerField()
class Proposicao(models.Model): class Proposicao(models.Model):
@ -163,24 +152,21 @@ class Proposicao(models.Model):
dat_devolucao = models.DateTimeField(blank=True, null=True) dat_devolucao = models.DateTimeField(blank=True, null=True)
txt_justif_devolucao = models.CharField(max_length=200, blank=True, null=True) txt_justif_devolucao = models.CharField(max_length=200, blank=True, null=True)
num_proposicao = models.IntegerField(blank=True, null=True) num_proposicao = models.IntegerField(blank=True, null=True)
ind_excluido = models.IntegerField()
class RegimeTramitacao(models.Model): class RegimeTramitacao(models.Model):
cod_regime_tramitacao = models.AutoField(primary_key=True) cod_regime_tramitacao = models.AutoField(primary_key=True)
des_regime_tramitacao = models.CharField(max_length=50) des_regime_tramitacao = models.CharField(max_length=50)
ind_excluido = models.IntegerField()
class Relatoria(models.Model): class Relatoria(models.Model):
cod_relatoria = models.AutoField(primary_key=True) cod_relatoria = models.AutoField(primary_key=True)
cod_materia = models.IntegerField() cod_materia = models.IntegerField()
cod_parlamentar = models.IntegerField() parlamentar = models.ForeignKey(Parlamentar)
tip_fim_relatoria = models.IntegerField(blank=True, null=True) tip_fim_relatoria = models.IntegerField(blank=True, null=True)
cod_comissao = models.IntegerField(blank=True, null=True) cod_comissao = models.IntegerField(blank=True, null=True)
dat_desig_relator = models.DateField() dat_desig_relator = models.DateField()
dat_destit_relator = models.DateField(blank=True, null=True) dat_destit_relator = models.DateField(blank=True, null=True)
ind_excluido = models.IntegerField()
class StatusTramitacao(models.Model): class StatusTramitacao(models.Model):
@ -189,25 +175,21 @@ class StatusTramitacao(models.Model):
des_status = models.CharField(max_length=60) des_status = models.CharField(max_length=60)
ind_fim_tramitacao = models.IntegerField() ind_fim_tramitacao = models.IntegerField()
ind_retorno_tramitacao = models.IntegerField() ind_retorno_tramitacao = models.IntegerField()
ind_excluido = models.IntegerField()
class TipoAutor(models.Model): class TipoAutor(models.Model):
tip_autor = models.IntegerField(primary_key=True) tip_autor = models.IntegerField(primary_key=True)
des_tipo_autor = models.CharField(max_length=50) des_tipo_autor = models.CharField(max_length=50)
ind_excluido = models.IntegerField()
class TipoDocumento(models.Model): class TipoDocumento(models.Model):
tip_documento = models.AutoField(primary_key=True) tip_documento = models.AutoField(primary_key=True)
des_tipo_documento = models.CharField(max_length=50) des_tipo_documento = models.CharField(max_length=50)
ind_excluido = models.IntegerField()
class TipoFimRelatoria(models.Model): class TipoFimRelatoria(models.Model):
tip_fim_relatoria = models.AutoField(primary_key=True) tip_fim_relatoria = models.AutoField(primary_key=True)
des_fim_relatoria = models.CharField(max_length=50) des_fim_relatoria = models.CharField(max_length=50)
ind_excluido = models.IntegerField()
class TipoMateriaLegislativa(models.Model): class TipoMateriaLegislativa(models.Model):
@ -216,7 +198,6 @@ class TipoMateriaLegislativa(models.Model):
des_tipo_materia = models.CharField(max_length=50) des_tipo_materia = models.CharField(max_length=50)
ind_num_automatica = models.IntegerField() ind_num_automatica = models.IntegerField()
quorum_minimo_votacao = models.IntegerField() quorum_minimo_votacao = models.IntegerField()
ind_excluido = models.IntegerField()
class TipoProposicao(models.Model): class TipoProposicao(models.Model):
@ -225,7 +206,6 @@ class TipoProposicao(models.Model):
ind_mat_ou_doc = models.CharField(max_length=1) ind_mat_ou_doc = models.CharField(max_length=1)
tip_mat_ou_doc = models.IntegerField() tip_mat_ou_doc = models.IntegerField()
nom_modelo = models.CharField(max_length=50) nom_modelo = models.CharField(max_length=50)
ind_excluido = models.IntegerField()
class Tramitacao(models.Model): class Tramitacao(models.Model):
@ -241,12 +221,10 @@ 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)
ind_excluido = models.IntegerField()
class UnidadeTramitacao(models.Model): class UnidadeTramitacao(models.Model):
cod_unid_tramitacao = models.AutoField(primary_key=True) cod_unid_tramitacao = models.AutoField(primary_key=True)
cod_comissao = models.IntegerField(blank=True, null=True) cod_comissao = models.IntegerField(blank=True, null=True)
cod_orgao = models.IntegerField(blank=True, null=True) cod_orgao = models.IntegerField(blank=True, null=True)
cod_parlamentar = models.IntegerField(blank=True, null=True) parlamentar = models.ForeignKey(Parlamentar, blank=True, null=True)
ind_excluido = models.IntegerField()

0
mesa/__init__.py

3
mesa/admin.py

@ -1,3 +0,0 @@
from django.contrib import admin
# Register your models here.

0
mesa/migrations/__init__.py

31
mesa/models.py

@ -1,31 +0,0 @@
from django.db import models
class CargoMesa(models.Model):
cod_cargo = models.AutoField(primary_key=True)
des_cargo = models.CharField(max_length=50)
ind_unico = models.IntegerField()
ind_excluido = models.IntegerField()
class ComposicaoMesa(models.Model):
cod_parlamentar = models.IntegerField()
cod_sessao_leg = models.IntegerField()
cod_cargo = models.IntegerField()
ind_excluido = models.IntegerField()
class Legislatura(models.Model):
data_inicio = models.DateField()
data_fim = models.DateField()
data_eleicao = models.DateField()
class SessaoLegislativa(models.Model):
legislatura = models.ForeignKey(Legislatura)
numero = models.IntegerField()
tipo = models.CharField(max_length=1)
data_inicio = models.DateField()
data_fim = models.DateField()
data_inicio_intervalo = models.DateField(blank=True, null=True)
data_fim_intervalo = models.DateField(blank=True, null=True)

3
mesa/tests.py

@ -1,3 +0,0 @@
from django.test import TestCase
# Create your tests here.

3
mesa/views.py

@ -1,3 +0,0 @@
from django.shortcuts import render
# Create your views here.

3
norma/models.py

@ -5,7 +5,6 @@ class AssuntoNorma(models.Model):
cod_assunto = models.AutoField(primary_key=True) cod_assunto = models.AutoField(primary_key=True)
des_assunto = models.CharField(max_length=50) des_assunto = models.CharField(max_length=50)
des_estendida = models.CharField(max_length=250, blank=True, null=True) des_estendida = models.CharField(max_length=250, blank=True, null=True)
ind_excluido = models.IntegerField()
class NormaJuridica(models.Model): class NormaJuridica(models.Model):
@ -27,7 +26,6 @@ class NormaJuridica(models.Model):
cod_assunto = models.CharField(max_length=16) cod_assunto = models.CharField(max_length=16)
dat_vigencia = models.DateField(blank=True, null=True) dat_vigencia = models.DateField(blank=True, null=True)
timestamp = models.DateTimeField() timestamp = models.DateTimeField()
ind_excluido = models.IntegerField()
class TipoNormaJuridica(models.Model): class TipoNormaJuridica(models.Model):
@ -35,7 +33,6 @@ class TipoNormaJuridica(models.Model):
voc_lexml = models.CharField(max_length=50, blank=True, null=True) voc_lexml = models.CharField(max_length=50, blank=True, null=True)
sgl_tipo_norma = models.CharField(max_length=3) sgl_tipo_norma = models.CharField(max_length=3)
des_tipo_norma = models.CharField(max_length=50) des_tipo_norma = models.CharField(max_length=50)
ind_excluido = models.IntegerField()
class VinculoNormaJuridica(models.Model): class VinculoNormaJuridica(models.Model):

104
parlamentares/models.py

@ -1,39 +1,32 @@
from django.db import models from django.db import models
class Legislatura(models.Model):
data_inicio = models.DateField()
data_fim = models.DateField()
data_eleicao = models.DateField()
class SessaoLegislativa(models.Model):
legislatura = models.ForeignKey(Legislatura)
numero = models.IntegerField()
tipo = models.CharField(max_length=1)
data_inicio = models.DateField()
data_fim = models.DateField()
data_inicio_intervalo = models.DateField(blank=True, null=True)
data_fim_intervalo = models.DateField(blank=True, null=True)
class Coligacao(models.Model): class Coligacao(models.Model):
cod_coligacao = models.AutoField(primary_key=True) cod_coligacao = models.AutoField(primary_key=True)
num_legislatura = models.IntegerField() legislatura = models.ForeignKey(Legislatura)
nom_coligacao = models.CharField(max_length=50) nom_coligacao = models.CharField(max_length=50)
num_votos_coligacao = models.IntegerField(blank=True, null=True) num_votos_coligacao = models.IntegerField(blank=True, null=True)
ind_excluido = models.IntegerField()
class ComposicaoColigacao(models.Model): class ComposicaoColigacao(models.Model):
cod_partido = models.IntegerField() cod_partido = models.IntegerField()
cod_coligacao = models.IntegerField() cod_coligacao = models.IntegerField()
ind_excluido = models.IntegerField()
class Dependente(models.Model):
cod_dependente = models.AutoField(primary_key=True)
tip_dependente = models.IntegerField()
cod_parlamentar = models.IntegerField()
nom_dependente = models.CharField(max_length=50)
sex_dependente = models.CharField(max_length=1)
dat_nascimento = models.DateField(blank=True, null=True)
num_cpf = models.CharField(max_length=14, blank=True, null=True)
num_rg = models.CharField(max_length=15, blank=True, null=True)
num_tit_eleitor = models.CharField(max_length=15, blank=True, null=True)
ind_excluido = models.IntegerField()
class Filiacao(models.Model):
dat_filiacao = models.DateField()
cod_parlamentar = models.IntegerField()
cod_partido = models.IntegerField()
dat_desfiliacao = models.DateField(blank=True, null=True)
ind_excluido = models.IntegerField()
class Localidade(models.Model): class Localidade(models.Model):
@ -43,21 +36,6 @@ class Localidade(models.Model):
tip_localidade = models.CharField(max_length=1, blank=True, null=True) tip_localidade = models.CharField(max_length=1, blank=True, null=True)
sgl_uf = models.CharField(max_length=2, blank=True, null=True) sgl_uf = models.CharField(max_length=2, blank=True, null=True)
sgl_regiao = models.CharField(max_length=2, blank=True, null=True) sgl_regiao = models.CharField(max_length=2, blank=True, null=True)
ind_excluido = models.IntegerField()
class Mandato(models.Model):
cod_mandato = models.AutoField(primary_key=True)
cod_parlamentar = models.IntegerField()
tip_afastamento = models.IntegerField(blank=True, null=True)
num_legislatura = models.IntegerField()
cod_coligacao = models.IntegerField(blank=True, null=True)
tip_causa_fim_mandato = models.IntegerField(blank=True, null=True)
dat_fim_mandato = models.DateField(blank=True, null=True)
num_votos_recebidos = models.IntegerField(blank=True, null=True)
dat_expedicao_diploma = models.DateField(blank=True, null=True)
txt_observacao = models.TextField(blank=True, null=True)
ind_excluido = models.IntegerField()
class NivelInstrucao(models.Model): class NivelInstrucao(models.Model):
@ -65,7 +43,7 @@ class NivelInstrucao(models.Model):
class Parlamentar(models.Model): class Parlamentar(models.Model):
cod_parlamentar = models.AutoField(primary_key=True) ###
cod_nivel_instrucao = models.IntegerField(blank=True, null=True) cod_nivel_instrucao = models.IntegerField(blank=True, null=True)
tip_situacao_militar = models.IntegerField(blank=True, null=True) tip_situacao_militar = models.IntegerField(blank=True, null=True)
nom_completo = models.CharField(max_length=50) nom_completo = models.CharField(max_length=50)
@ -91,7 +69,38 @@ class Parlamentar(models.Model):
ind_ativo = models.IntegerField() ind_ativo = models.IntegerField()
txt_biografia = models.TextField(blank=True, null=True) txt_biografia = models.TextField(blank=True, null=True)
ind_unid_deliberativa = models.IntegerField() ind_unid_deliberativa = models.IntegerField()
ind_excluido = models.IntegerField()
class Dependente(models.Model):
cod_dependente = models.AutoField(primary_key=True)
tip_dependente = models.IntegerField()
parlamentar = models.ForeignKey(Parlamentar)
nom_dependente = models.CharField(max_length=50)
sex_dependente = models.CharField(max_length=1)
dat_nascimento = models.DateField(blank=True, null=True)
num_cpf = models.CharField(max_length=14, blank=True, null=True)
num_rg = models.CharField(max_length=15, blank=True, null=True)
num_tit_eleitor = models.CharField(max_length=15, blank=True, null=True)
class Filiacao(models.Model):
dat_filiacao = models.DateField()
parlamentar = models.ForeignKey(Parlamentar)
cod_partido = models.IntegerField()
dat_desfiliacao = models.DateField(blank=True, null=True)
class Mandato(models.Model):
cod_mandato = models.AutoField(primary_key=True)
parlamentar = models.ForeignKey(Parlamentar)
tip_afastamento = models.IntegerField(blank=True, null=True)
legislatura = models.ForeignKey(Legislatura)
cod_coligacao = models.IntegerField(blank=True, null=True)
tip_causa_fim_mandato = models.IntegerField(blank=True, null=True)
dat_fim_mandato = models.DateField(blank=True, null=True)
num_votos_recebidos = models.IntegerField(blank=True, null=True)
dat_expedicao_diploma = models.DateField(blank=True, null=True)
txt_observacao = models.TextField(blank=True, null=True)
class Partido(models.Model): class Partido(models.Model):
@ -100,7 +109,6 @@ class Partido(models.Model):
nom_partido = models.CharField(max_length=50) nom_partido = models.CharField(max_length=50)
dat_criacao = models.DateField(blank=True, null=True) dat_criacao = models.DateField(blank=True, null=True)
dat_extincao = models.DateField(blank=True, null=True) dat_extincao = models.DateField(blank=True, null=True)
ind_excluido = models.IntegerField()
class TipoAfastamento(models.Model): class TipoAfastamento(models.Model):
@ -109,18 +117,24 @@ class TipoAfastamento(models.Model):
ind_afastamento = models.IntegerField() ind_afastamento = models.IntegerField()
ind_fim_mandato = models.IntegerField() ind_fim_mandato = models.IntegerField()
des_dispositivo = models.CharField(max_length=50, blank=True, null=True) des_dispositivo = models.CharField(max_length=50, blank=True, null=True)
ind_excluido = models.IntegerField()
class TipoDependente(models.Model): class TipoDependente(models.Model):
tip_dependente = models.AutoField(primary_key=True) tip_dependente = models.AutoField(primary_key=True)
des_tipo_dependente = models.CharField(max_length=50) des_tipo_dependente = models.CharField(max_length=50)
ind_excluido = models.IntegerField()
class TipoSituacaoMilitar(models.Model): class TipoSituacaoMilitar(models.Model):
tip_situacao_militar = models.IntegerField(primary_key=True) tip_situacao_militar = models.IntegerField(primary_key=True)
des_tipo_situacao = models.CharField(max_length=50) des_tipo_situacao = models.CharField(max_length=50)
ind_excluido = models.IntegerField()
class CargoMesa(models.Model):
nome = models.CharField(max_length=50)
unico = models.BooleanField()
class ComposicaoMesa(models.Model):
parlamentar = models.ForeignKey(Parlamentar)
sessao_legislativa = models.ForeignKey(SessaoLegislativa)
cargo = models.ForeignKey(CargoMesa)

5
protocoloadm/models.py

@ -11,7 +11,6 @@ class DocumentoAcessorioAdministrativo(models.Model):
nom_autor_documento = models.CharField(max_length=50, blank=True, null=True) nom_autor_documento = models.CharField(max_length=50, blank=True, null=True)
txt_assunto = models.TextField(blank=True, null=True) txt_assunto = models.TextField(blank=True, null=True)
txt_indexacao = models.TextField(blank=True, null=True) txt_indexacao = models.TextField(blank=True, null=True)
ind_excluido = models.IntegerField()
class DocumentoAdministrativo(models.Model): class DocumentoAdministrativo(models.Model):
@ -28,7 +27,6 @@ class DocumentoAdministrativo(models.Model):
ind_tramitacao = models.IntegerField() ind_tramitacao = models.IntegerField()
txt_assunto = models.TextField() txt_assunto = models.TextField()
txt_observacao = models.TextField(blank=True, null=True) txt_observacao = models.TextField(blank=True, null=True)
ind_excluido = models.IntegerField()
class Protocolo(models.Model): class Protocolo(models.Model):
@ -60,14 +58,12 @@ class StatusTramitacaoAdministrativo(models.Model):
des_status = models.CharField(max_length=60) des_status = models.CharField(max_length=60)
ind_fim_tramitacao = models.IntegerField() ind_fim_tramitacao = models.IntegerField()
ind_retorno_tramitacao = models.IntegerField() ind_retorno_tramitacao = models.IntegerField()
ind_excluido = models.IntegerField()
class TipoDocumentoAdministrativo(models.Model): class TipoDocumentoAdministrativo(models.Model):
tip_documento = models.AutoField(primary_key=True) tip_documento = models.AutoField(primary_key=True)
sgl_tipo_documento = models.CharField(max_length=5) sgl_tipo_documento = models.CharField(max_length=5)
des_tipo_documento = models.CharField(max_length=50) des_tipo_documento = models.CharField(max_length=50)
ind_excluido = models.IntegerField()
class TramitacaoAdministrativo(models.Model): class TramitacaoAdministrativo(models.Model):
@ -81,4 +77,3 @@ class TramitacaoAdministrativo(models.Model):
ind_ult_tramitacao = models.IntegerField() ind_ult_tramitacao = models.IntegerField()
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)
ind_excluido = models.IntegerField()

1
sapl/settings.py

@ -41,7 +41,6 @@ INSTALLED_APPS = (
'base', 'base',
# sapl modules # sapl modules
'mesa',
'parlamentares', 'parlamentares',
'comissoes', 'comissoes',
'sessao', 'sessao',

31
sessao/models.py

@ -1,5 +1,7 @@
from django.db import models from django.db import models
from parlamentares.models import CargoMesa, Legislatura, Parlamentar
class ExpedienteMateria(models.Model): class ExpedienteMateria(models.Model):
cod_ordem = models.AutoField(primary_key=True) cod_ordem = models.AutoField(primary_key=True)
@ -7,7 +9,6 @@ class ExpedienteMateria(models.Model):
cod_materia = models.IntegerField() cod_materia = models.IntegerField()
dat_ordem = models.DateField() dat_ordem = models.DateField()
txt_observacao = models.TextField(blank=True, null=True) txt_observacao = models.TextField(blank=True, null=True)
ind_excluido = models.IntegerField()
num_ordem = models.IntegerField() num_ordem = models.IntegerField()
txt_resultado = models.TextField(blank=True, null=True) txt_resultado = models.TextField(blank=True, null=True)
tip_votacao = models.IntegerField() tip_votacao = models.IntegerField()
@ -17,31 +18,28 @@ class ExpedienteSessaoPlenaria(models.Model):
cod_sessao_plen = models.IntegerField() cod_sessao_plen = models.IntegerField()
cod_expediente = models.IntegerField() cod_expediente = models.IntegerField()
txt_expediente = models.TextField(blank=True, null=True) txt_expediente = models.TextField(blank=True, null=True)
ind_excluido = models.IntegerField()
class MesaSessaoPlenaria(models.Model): class MesaSessaoPlenaria(models.Model):
cod_cargo = models.IntegerField() cargo = models.ForeignKey(CargoMesa)
cod_sessao_leg = models.IntegerField() cod_sessao_leg = models.IntegerField()
cod_parlamentar = models.IntegerField() parlamentar = models.ForeignKey(Parlamentar)
cod_sessao_plen = models.IntegerField() cod_sessao_plen = models.IntegerField()
ind_excluido = models.IntegerField(blank=True, null=True) ind_excluido = models.IntegerField(blank=True, null=True)
class Oradores(models.Model): class Oradores(models.Model):
cod_sessao_plen = models.IntegerField() cod_sessao_plen = models.IntegerField()
cod_parlamentar = models.IntegerField() parlamentar = models.ForeignKey(Parlamentar)
num_ordem = models.IntegerField() num_ordem = models.IntegerField()
url_discurso = models.CharField(max_length=150, blank=True, null=True) url_discurso = models.CharField(max_length=150, blank=True, null=True)
ind_excluido = models.IntegerField()
class OradoresExpediente(models.Model): class OradoresExpediente(models.Model):
cod_sessao_plen = models.IntegerField() cod_sessao_plen = models.IntegerField()
cod_parlamentar = models.IntegerField() parlamentar = models.ForeignKey(Parlamentar)
num_ordem = models.IntegerField() num_ordem = models.IntegerField()
url_discurso = models.CharField(max_length=150, blank=True, null=True) url_discurso = models.CharField(max_length=150, blank=True, null=True)
ind_excluido = models.IntegerField()
class OrdemDia(models.Model): class OrdemDia(models.Model):
@ -50,7 +48,6 @@ class OrdemDia(models.Model):
cod_materia = models.IntegerField() cod_materia = models.IntegerField()
dat_ordem = models.DateField() dat_ordem = models.DateField()
txt_observacao = models.TextField(blank=True, null=True) txt_observacao = models.TextField(blank=True, null=True)
ind_excluido = models.IntegerField()
num_ordem = models.IntegerField() num_ordem = models.IntegerField()
txt_resultado = models.TextField(blank=True, null=True) txt_resultado = models.TextField(blank=True, null=True)
tip_votacao = models.IntegerField() tip_votacao = models.IntegerField()
@ -59,9 +56,8 @@ class OrdemDia(models.Model):
class OrdemDiaPresenca(models.Model): class OrdemDiaPresenca(models.Model):
cod_presenca_ordem_dia = models.AutoField(primary_key=True) cod_presenca_ordem_dia = models.AutoField(primary_key=True)
cod_sessao_plen = models.IntegerField() cod_sessao_plen = models.IntegerField()
cod_parlamentar = models.IntegerField() parlamentar = models.ForeignKey(Parlamentar)
dat_ordem = models.DateField() dat_ordem = models.DateField()
ind_excluido = models.IntegerField()
class RegistroVotacao(models.Model): class RegistroVotacao(models.Model):
@ -73,13 +69,11 @@ class RegistroVotacao(models.Model):
num_votos_nao = models.IntegerField() num_votos_nao = models.IntegerField()
num_abstencao = models.IntegerField() num_abstencao = models.IntegerField()
txt_observacao = models.TextField(blank=True, null=True) txt_observacao = models.TextField(blank=True, null=True)
ind_excluido = models.IntegerField()
class RegistroVotacaoParlamentar(models.Model): class RegistroVotacaoParlamentar(models.Model):
cod_votacao = models.IntegerField() cod_votacao = models.IntegerField()
cod_parlamentar = models.IntegerField() parlamentar = models.ForeignKey(Parlamentar)
ind_excluido = models.IntegerField()
vot_parlamentar = models.CharField(max_length=10) vot_parlamentar = models.CharField(max_length=10)
@ -88,7 +82,7 @@ class SessaoPlenaria(models.Model):
cod_andamento_sessao = models.IntegerField(blank=True, null=True) cod_andamento_sessao = models.IntegerField(blank=True, null=True)
tip_sessao = models.IntegerField() tip_sessao = models.IntegerField()
cod_sessao_leg = models.IntegerField() cod_sessao_leg = models.IntegerField()
num_legislatura = models.IntegerField() legislatura = models.ForeignKey(Legislatura)
tip_expediente = models.CharField(max_length=10) tip_expediente = models.CharField(max_length=10)
dat_inicio_sessao = models.DateField() dat_inicio_sessao = models.DateField()
dia_sessao = models.CharField(max_length=15) dia_sessao = models.CharField(max_length=15)
@ -98,31 +92,26 @@ class SessaoPlenaria(models.Model):
dat_fim_sessao = models.DateField(blank=True, null=True) dat_fim_sessao = models.DateField(blank=True, null=True)
url_audio = models.CharField(max_length=150, blank=True, null=True) url_audio = models.CharField(max_length=150, blank=True, null=True)
url_video = models.CharField(max_length=150, blank=True, null=True) url_video = models.CharField(max_length=150, blank=True, null=True)
ind_excluido = models.IntegerField()
class SessaoPlenariaPresenca(models.Model): class SessaoPlenariaPresenca(models.Model):
cod_presenca_sessao = models.AutoField(primary_key=True) cod_presenca_sessao = models.AutoField(primary_key=True)
cod_sessao_plen = models.IntegerField() cod_sessao_plen = models.IntegerField()
cod_parlamentar = models.IntegerField() parlamentar = models.ForeignKey(Parlamentar)
dat_sessao = models.DateField(blank=True, null=True) dat_sessao = models.DateField(blank=True, null=True)
ind_excluido = models.IntegerField()
class TipoExpediente(models.Model): class TipoExpediente(models.Model):
cod_expediente = models.AutoField(primary_key=True) cod_expediente = models.AutoField(primary_key=True)
nom_expediente = models.CharField(max_length=100) nom_expediente = models.CharField(max_length=100)
ind_excluido = models.IntegerField()
class TipoResultadoVotacao(models.Model): class TipoResultadoVotacao(models.Model):
tip_resultado_votacao = models.AutoField(primary_key=True) tip_resultado_votacao = models.AutoField(primary_key=True)
nom_resultado = models.CharField(max_length=100) nom_resultado = models.CharField(max_length=100)
ind_excluido = models.IntegerField()
class TipoSessaoPlenaria(models.Model): class TipoSessaoPlenaria(models.Model):
tip_sessao = models.AutoField(primary_key=True) tip_sessao = models.AutoField(primary_key=True)
nom_sessao = models.CharField(max_length=30) nom_sessao = models.CharField(max_length=30)
ind_excluido = models.IntegerField()
num_minimo = models.IntegerField() num_minimo = models.IntegerField()

Loading…
Cancel
Save