This repository has been archived by the owner on Feb 28, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #265 from giovanisleite/giovani-create-chamber-of-…
…deputies-app Create chamber_of_deputies app
- Loading branch information
Showing
56 changed files
with
681 additions
and
443 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,5 +30,5 @@ ratings: | |
- "**.sh" | ||
|
||
exclude_paths: | ||
- "jarbas/core/migrations/" | ||
- "**/migrations/" | ||
- "**/tests/*.py" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class ChamberOfDeputiesConfig(AppConfig): | ||
name = 'jarbas.chamber_of_deputies' | ||
verbose_name = 'Câmara dos Deputados - Cota para Exercício da Atividade Parlamentar' |
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../core/management/commands/searchvector.py → ...uties/management/commands/searchvector.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.5 on 2017-10-14 07:45 | ||
from __future__ import unicode_literals | ||
|
||
from django.conf import settings | ||
import django.contrib.postgres.fields.jsonb | ||
import django.contrib.postgres.indexes | ||
import django.contrib.postgres.search | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('core', '0041_migrate_data_to_chamber_of_deputies_app'), | ||
] | ||
|
||
state_operations = [ | ||
migrations.CreateModel( | ||
name='HistoricalReimbursement', | ||
fields=[ | ||
('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), | ||
('document_id', models.IntegerField(db_index=True, verbose_name='Número do Reembolso')), | ||
('last_update', models.DateTimeField(blank=True, db_index=True, editable=False, verbose_name='Atualizado no Jarbas em')), | ||
('available_in_latest_dataset', models.BooleanField(default=True, verbose_name='Disponível na Câmara dos Deputados')), | ||
('year', models.IntegerField(db_index=True, verbose_name='Ano')), | ||
('applicant_id', models.IntegerField(db_index=True, verbose_name='Identificador do Solicitante')), | ||
('total_reimbursement_value', models.DecimalField(blank=True, decimal_places=3, max_digits=10, null=True, verbose_name='Valor da Restituição')), | ||
('total_net_value', models.DecimalField(decimal_places=3, max_digits=10, verbose_name='Valor Líquido')), | ||
('reimbursement_numbers', models.CharField(max_length=140, verbose_name='Números dos Ressarcimentos')), | ||
('net_values', models.CharField(max_length=140, verbose_name='Valores Líquidos dos Ressarcimentos')), | ||
('congressperson_id', models.IntegerField(blank=True, null=True, verbose_name='Identificador Único do Parlamentar')), | ||
('congressperson_name', models.CharField(blank=True, db_index=True, max_length=140, null=True, verbose_name='Nome do Parlamentar')), | ||
('congressperson_document', models.IntegerField(blank=True, null=True, verbose_name='Número da Carteira Parlamentar')), | ||
('party', models.CharField(blank=True, max_length=7, null=True, verbose_name='Partido')), | ||
('state', models.CharField(blank=True, db_index=True, max_length=2, null=True, verbose_name='UF')), | ||
('term_id', models.IntegerField(blank=True, null=True, verbose_name='Código da Legislatura')), | ||
('term', models.IntegerField(blank=True, null=True, verbose_name='Número da Legislatura')), | ||
('subquota_id', models.IntegerField(db_index=True, verbose_name='Número da Subcota')), | ||
('subquota_description', models.CharField(db_index=True, max_length=140, verbose_name='Descrição da Subcota')), | ||
('subquota_group_id', models.IntegerField(blank=True, null=True, verbose_name='Número da Especificação da Subcota')), | ||
('subquota_group_description', models.CharField(blank=True, max_length=140, null=True, verbose_name='Descrição da Especificação da Subcota')), | ||
('supplier', models.CharField(max_length=140, verbose_name='Fornecedor')), | ||
('cnpj_cpf', models.CharField(blank=True, db_index=True, max_length=14, null=True, verbose_name='CNPJ ou CPF')), | ||
('document_type', models.IntegerField(verbose_name='Indicativo de Tipo de Documento Fiscal')), | ||
('document_number', models.CharField(blank=True, max_length=140, null=True, verbose_name='Número do Documento')), | ||
('document_value', models.DecimalField(decimal_places=3, max_digits=10, verbose_name='Valor do Documento')), | ||
('issue_date', models.DateField(db_index=True, verbose_name='Data de Emissão')), | ||
('month', models.IntegerField(db_index=True, verbose_name='Mês')), | ||
('remark_value', models.DecimalField(blank=True, decimal_places=3, max_digits=10, null=True, verbose_name='Valor da Glosa')), | ||
('installment', models.IntegerField(blank=True, null=True, verbose_name='Número da Parcela')), | ||
('batch_number', models.IntegerField(verbose_name='Número do Lote')), | ||
('reimbursement_values', models.CharField(blank=True, max_length=140, null=True, verbose_name='Valores dos Ressarcimentos')), | ||
('passenger', models.CharField(blank=True, max_length=140, null=True, verbose_name='Passageiro')), | ||
('leg_of_the_trip', models.CharField(blank=True, max_length=140, null=True, verbose_name='Trecho')), | ||
('probability', models.DecimalField(blank=True, decimal_places=5, max_digits=6, null=True, verbose_name='Probabilidade')), | ||
('suspicions', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True, verbose_name='Suspeitas')), | ||
('receipt_fetched', models.BooleanField(db_index=True, default=False, verbose_name='Tentamos acessar a URL do documento fiscal?')), | ||
('receipt_url', models.CharField(blank=True, max_length=140, null=True, verbose_name='URL do Documento Fiscal')), | ||
('receipt_text', models.TextField(blank=True, null=True, verbose_name='Texto do Recibo')), | ||
('search_vector', django.contrib.postgres.search.SearchVectorField(null=True)), | ||
('history_id', models.AutoField(primary_key=True, serialize=False)), | ||
('history_date', models.DateTimeField()), | ||
('history_type', models.CharField(choices=[('+', 'Criado'), ('~', 'Modificado'), ('-', 'Excluído')], max_length=1)), | ||
], | ||
options={ | ||
'get_latest_by': 'history_date', | ||
'ordering': ('-history_date', '-history_id'), | ||
'verbose_name': 'historical reembolso', | ||
'db_table': 'chamber_of_deputies_historicalreimbursement', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Reimbursement', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('document_id', models.IntegerField(db_index=True, unique=True, verbose_name='Número do Reembolso')), | ||
('last_update', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Atualizado no Jarbas em')), | ||
('available_in_latest_dataset', models.BooleanField(default=True, verbose_name='Disponível na Câmara dos Deputados')), | ||
('year', models.IntegerField(db_index=True, verbose_name='Ano')), | ||
('applicant_id', models.IntegerField(db_index=True, verbose_name='Identificador do Solicitante')), | ||
('total_reimbursement_value', models.DecimalField(blank=True, decimal_places=3, max_digits=10, null=True, verbose_name='Valor da Restituição')), | ||
('total_net_value', models.DecimalField(decimal_places=3, max_digits=10, verbose_name='Valor Líquido')), | ||
('reimbursement_numbers', models.CharField(max_length=140, verbose_name='Números dos Ressarcimentos')), | ||
('net_values', models.CharField(max_length=140, verbose_name='Valores Líquidos dos Ressarcimentos')), | ||
('congressperson_id', models.IntegerField(blank=True, null=True, verbose_name='Identificador Único do Parlamentar')), | ||
('congressperson_name', models.CharField(blank=True, db_index=True, max_length=140, null=True, verbose_name='Nome do Parlamentar')), | ||
('congressperson_document', models.IntegerField(blank=True, null=True, verbose_name='Número da Carteira Parlamentar')), | ||
('party', models.CharField(blank=True, max_length=7, null=True, verbose_name='Partido')), | ||
('state', models.CharField(blank=True, db_index=True, max_length=2, null=True, verbose_name='UF')), | ||
('term_id', models.IntegerField(blank=True, null=True, verbose_name='Código da Legislatura')), | ||
('term', models.IntegerField(blank=True, null=True, verbose_name='Número da Legislatura')), | ||
('subquota_id', models.IntegerField(db_index=True, verbose_name='Número da Subcota')), | ||
('subquota_description', models.CharField(db_index=True, max_length=140, verbose_name='Descrição da Subcota')), | ||
('subquota_group_id', models.IntegerField(blank=True, null=True, verbose_name='Número da Especificação da Subcota')), | ||
('subquota_group_description', models.CharField(blank=True, max_length=140, null=True, verbose_name='Descrição da Especificação da Subcota')), | ||
('supplier', models.CharField(max_length=140, verbose_name='Fornecedor')), | ||
('cnpj_cpf', models.CharField(blank=True, db_index=True, max_length=14, null=True, verbose_name='CNPJ ou CPF')), | ||
('document_type', models.IntegerField(verbose_name='Indicativo de Tipo de Documento Fiscal')), | ||
('document_number', models.CharField(blank=True, max_length=140, null=True, verbose_name='Número do Documento')), | ||
('document_value', models.DecimalField(decimal_places=3, max_digits=10, verbose_name='Valor do Documento')), | ||
('issue_date', models.DateField(db_index=True, verbose_name='Data de Emissão')), | ||
('month', models.IntegerField(db_index=True, verbose_name='Mês')), | ||
('remark_value', models.DecimalField(blank=True, decimal_places=3, max_digits=10, null=True, verbose_name='Valor da Glosa')), | ||
('installment', models.IntegerField(blank=True, null=True, verbose_name='Número da Parcela')), | ||
('batch_number', models.IntegerField(verbose_name='Número do Lote')), | ||
('reimbursement_values', models.CharField(blank=True, max_length=140, null=True, verbose_name='Valores dos Ressarcimentos')), | ||
('passenger', models.CharField(blank=True, max_length=140, null=True, verbose_name='Passageiro')), | ||
('leg_of_the_trip', models.CharField(blank=True, max_length=140, null=True, verbose_name='Trecho')), | ||
('probability', models.DecimalField(blank=True, decimal_places=5, max_digits=6, null=True, verbose_name='Probabilidade')), | ||
('suspicions', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True, verbose_name='Suspeitas')), | ||
('receipt_fetched', models.BooleanField(db_index=True, default=False, verbose_name='Tentamos acessar a URL do documento fiscal?')), | ||
('receipt_url', models.CharField(blank=True, max_length=140, null=True, verbose_name='URL do Documento Fiscal')), | ||
('receipt_text', models.TextField(blank=True, null=True, verbose_name='Texto do Recibo')), | ||
('search_vector', django.contrib.postgres.search.SearchVectorField(null=True)), | ||
], | ||
options={ | ||
'verbose_name_plural': 'reembolsos', | ||
'ordering': ('-year', '-issue_date'), | ||
'verbose_name': 'reembolso', | ||
'db_table': 'chamber_of_deputies_reimbursement', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Tweet', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('status', models.DecimalField(db_index=True, decimal_places=0, max_digits=25, verbose_name='Tweet ID')), | ||
('reimbursement', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='chamber_of_deputies.Reimbursement')), | ||
], | ||
options={ | ||
'ordering': ('-status',), | ||
'db_table': 'chamber_of_deputies_tweet', | ||
}, | ||
), | ||
migrations.AddIndex( | ||
model_name='reimbursement', | ||
index=django.contrib.postgres.indexes.GinIndex(fields=['search_vector'], name='chamber_of__search__10d8b3_gin'), | ||
), | ||
migrations.AlterIndexTogether( | ||
name='reimbursement', | ||
index_together=set([('year', 'issue_date', 'id')]), | ||
), | ||
migrations.AddField( | ||
model_name='historicalreimbursement', | ||
name='history_user', | ||
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL), | ||
), | ||
] | ||
|
||
operations = [ | ||
migrations.SeparateDatabaseAndState(state_operations=state_operations) | ||
] |
Empty file.
Oops, something went wrong.