Skip to content

Commit

Permalink
Merge pull request #138 from ResidenciaTICBrisa/criando-models
Browse files Browse the repository at this point in the history
Implementação das models
  • Loading branch information
hemanoelbritoF authored Oct 20, 2023
2 parents f297fda + 671ba49 commit d187b05
Show file tree
Hide file tree
Showing 17 changed files with 439 additions and 4 deletions.
Binary file added project/app/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file added project/app/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file added project/app/__pycache__/apps.cpython-38.pyc
Binary file not shown.
Binary file added project/app/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file added project/app/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file added project/app/__pycache__/views.cpython-38.pyc
Binary file not shown.
95 changes: 95 additions & 0 deletions project/app/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Generated by Django 4.2.5 on 2023-10-06 17:38

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='Export',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('data_export', models.DateTimeField(auto_now_add=True)),
('formato', models.CharField(max_length=200)),
('nome_template', models.CharField(max_length=200)),
('nome_usuario', models.CharField(max_length=200)),
('id_projeto', models.CharField(max_length=200)),
],
),
migrations.CreateModel(
name='Mapeamento',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('CODIGO', models.CharField(max_length=70)),
('NOME', models.CharField(max_length=70)),
('SALDO', models.CharField(max_length=70)),
('DATA_ASSINATURA', models.CharField(max_length=70)),
('DATA_VIGENCIA', models.CharField(max_length=70)),
('DATA_ENCERRAMENTO', models.CharField(max_length=70)),
('TIPO_CONTRATO', models.CharField(max_length=70)),
('INSTITUICAO_EXECUTORA', models.CharField(max_length=70)),
('PROCESSO', models.CharField(max_length=70)),
('SUBPROCESSO', models.CharField(max_length=70)),
('COD_PROPOSTA', models.CharField(max_length=70)),
('PROPOSTA', models.CharField(max_length=70)),
('OBJETIVOS', models.CharField(max_length=70)),
('VALOR_APROVADO', models.CharField(max_length=70)),
('NOME_TP_CONTROLE_SALDO', models.CharField(max_length=70)),
('GRUPO_GESTORES', models.CharField(max_length=70)),
('GESTOR_RESP', models.CharField(max_length=70)),
('COORDENADOR', models.CharField(max_length=70)),
('PROCEDIMENTO_COMPRA', models.CharField(max_length=70)),
('TAB_FRETE', models.CharField(max_length=70)),
('TAB_DIARIAS', models.CharField(max_length=70)),
('CUSTO_OP', models.CharField(max_length=70)),
('NOME_FINANCIADOR', models.CharField(max_length=70)),
('DEPARTAMENTO', models.CharField(max_length=70)),
('SITUACAO', models.CharField(max_length=70)),
('BANCO', models.CharField(max_length=70)),
('AGENCIA_BANCARIA', models.CharField(max_length=70)),
('CONTA_BANCARIA', models.CharField(max_length=70)),
('CENTRO_CUSTO', models.CharField(max_length=70)),
('CONTA_CAIXA', models.CharField(max_length=70)),
('CATEGORIA_PROJETO', models.CharField(max_length=70)),
('COD_CONVENIO_CONTA', models.CharField(max_length=70)),
('COD_STATUS', models.CharField(max_length=70)),
('IND_SUB_PROJETO', models.CharField(max_length=70)),
('TIPO_CUSTO_OP', models.CharField(max_length=70)),
('PROJETO_MAE', models.CharField(max_length=70)),
('ID_COORDENADOR', models.CharField(max_length=70)),
('ID_FINANCIADOR', models.CharField(max_length=70)),
('ID_INSTITUICAO', models.CharField(max_length=70)),
('ID_DEPARTAMENTO', models.CharField(max_length=70)),
('NOME_INSTITUICAO', models.CharField(max_length=70)),
('ID_INSTITUICAO_EXECUTORA', models.CharField(max_length=70)),
('ID_TIPO', models.CharField(max_length=70)),
],
),
migrations.CreateModel(
name='Report',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('titulo', models.CharField(max_length=200)),
('descricao', models.CharField(max_length=200)),
('tipo_erro', models.CharField(max_length=200)),
('id_projeto', models.CharField(max_length=200)),
('nome_usuario', models.CharField(max_length=200)),
],
),
migrations.CreateModel(
name='Template',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('nome_template', models.CharField(max_length=200)),
('endereco_template', models.CharField(max_length=200)),
('mapeamento', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.mapeamento')),
],
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
# Generated by Django 4.2.5 on 2023-10-07 01:15

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('app', '0001_initial'),
]

operations = [
migrations.RenameField(
model_name='mapeamento',
old_name='AGENCIA_BANCARIA',
new_name='agencia_bancaria',
),
migrations.RenameField(
model_name='mapeamento',
old_name='BANCO',
new_name='banco',
),
migrations.RenameField(
model_name='mapeamento',
old_name='CATEGORIA_PROJETO',
new_name='categoria_projeto',
),
migrations.RenameField(
model_name='mapeamento',
old_name='CENTRO_CUSTO',
new_name='centro_custo',
),
migrations.RenameField(
model_name='mapeamento',
old_name='CODIGO',
new_name='codigo',
),
migrations.RenameField(
model_name='mapeamento',
old_name='CONTA_BANCARIA',
new_name='conta_bancaria',
),
migrations.RenameField(
model_name='mapeamento',
old_name='CONTA_CAIXA',
new_name='conta_caixa',
),
migrations.RenameField(
model_name='mapeamento',
old_name='COORDENADOR',
new_name='coordenador',
),
migrations.RenameField(
model_name='mapeamento',
old_name='CUSTO_OP',
new_name='custo_op',
),
migrations.RenameField(
model_name='mapeamento',
old_name='DATA_ASSINATURA',
new_name='data_assinatura',
),
migrations.RenameField(
model_name='mapeamento',
old_name='DATA_ENCERRAMENTO',
new_name='data_encerramento',
),
migrations.RenameField(
model_name='mapeamento',
old_name='DATA_VIGENCIA',
new_name='data_vigencia',
),
migrations.RenameField(
model_name='mapeamento',
old_name='DEPARTAMENTO',
new_name='departamento',
),
migrations.RenameField(
model_name='mapeamento',
old_name='GESTOR_RESP',
new_name='gestor_resp',
),
migrations.RenameField(
model_name='mapeamento',
old_name='GRUPO_GESTORES',
new_name='grupo_gestores',
),
migrations.RenameField(
model_name='mapeamento',
old_name='ID_COORDENADOR',
new_name='id_coordenador',
),
migrations.RenameField(
model_name='mapeamento',
old_name='ID_DEPARTAMENTO',
new_name='id_departamento',
),
migrations.RenameField(
model_name='mapeamento',
old_name='ID_FINANCIADOR',
new_name='id_financiador',
),
migrations.RenameField(
model_name='mapeamento',
old_name='ID_INSTITUICAO',
new_name='id_instituicao',
),
migrations.RenameField(
model_name='mapeamento',
old_name='ID_INSTITUICAO_EXECUTORA',
new_name='id_instituicao_executora',
),
migrations.RenameField(
model_name='mapeamento',
old_name='ID_TIPO',
new_name='id_tipo',
),
migrations.RenameField(
model_name='mapeamento',
old_name='IND_SUB_PROJETO',
new_name='ind_sub_projeto',
),
migrations.RenameField(
model_name='mapeamento',
old_name='INSTITUICAO_EXECUTORA',
new_name='instituicao_executora',
),
migrations.RenameField(
model_name='mapeamento',
old_name='NOME',
new_name='nome',
),
migrations.RenameField(
model_name='mapeamento',
old_name='NOME_FINANCIADOR',
new_name='nome_financiador',
),
migrations.RenameField(
model_name='mapeamento',
old_name='NOME_INSTITUICAO',
new_name='nome_instituicao',
),
migrations.RenameField(
model_name='mapeamento',
old_name='NOME_TP_CONTROLE_SALDO',
new_name='nome_tp_controle_saldo',
),
migrations.RenameField(
model_name='mapeamento',
old_name='OBJETIVOS',
new_name='objetivos',
),
migrations.RenameField(
model_name='mapeamento',
old_name='PROCEDIMENTO_COMPRA',
new_name='procedimento_compra',
),
migrations.RenameField(
model_name='mapeamento',
old_name='PROCESSO',
new_name='processo',
),
migrations.RenameField(
model_name='mapeamento',
old_name='PROJETO_MAE',
new_name='projeto_mae',
),
migrations.RenameField(
model_name='mapeamento',
old_name='PROPOSTA',
new_name='proposta',
),
migrations.RenameField(
model_name='mapeamento',
old_name='SALDO',
new_name='saldo',
),
migrations.RenameField(
model_name='mapeamento',
old_name='SITUACAO',
new_name='situacao',
),
migrations.RenameField(
model_name='mapeamento',
old_name='SUBPROCESSO',
new_name='subprocesso',
),
migrations.RenameField(
model_name='mapeamento',
old_name='TAB_DIARIAS',
new_name='tab_diarias',
),
migrations.RenameField(
model_name='mapeamento',
old_name='TAB_FRETE',
new_name='tab_frete',
),
migrations.RenameField(
model_name='mapeamento',
old_name='TIPO_CONTRATO',
new_name='tipo_contrato',
),
migrations.RenameField(
model_name='mapeamento',
old_name='TIPO_CUSTO_OP',
new_name='tipo_custo_op',
),
migrations.RenameField(
model_name='mapeamento',
old_name='VALOR_APROVADO',
new_name='valor_aprovado',
),
]
Binary file not shown.
Binary file not shown.
Binary file not shown.
71 changes: 70 additions & 1 deletion project/app/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,72 @@
from django.db import models

# Create your models here.
class Mapeamento(models.Model):
id_mapeamento = models.IntegerField(primary_key=True)
codigo = models.CharField(max_length=200)
nome = models.CharField(max_length=200)
saldo = models.CharField(max_length=200)
data_assinatura = models.CharField(max_length=200)
data_vigencia = models.CharField(max_length=200)
data_encerramento = models.CharField(max_length=200)
tipo_contrato = models.CharField(max_length=200)
instituicao_executora = models.CharField(max_length=200)
processo = models.CharField(max_length=200)
subprocesso = models.CharField(max_length=200)
cod_proposta = models.CharField(max_length=200)
proposta = models.CharField(max_length=200)
objetivos = models.CharField(max_length=200)
valor_aprovado = models.CharField(max_length=200)
nome_tp_controle_saldo = models.CharField(max_length=200)
grupo_gestores = models.CharField(max_length=200)
gestor_resp = models.CharField(max_length=200)
coordenador = models.CharField(max_length=200)
procedimento_compra = models.CharField(max_length=200)
tab_frete = models.CharField(max_length=200)
tab_diarias = models.CharField(max_length=200)
custo_op = models.CharField(max_length=200)
nome_financiador = models.CharField(max_length=200)
departamento = models.CharField(max_length=200)
situacao = models.CharField(max_length=200)
banco = models.CharField(max_length=200)
agencia_bancaria = models.CharField(max_length=200)
conta_bancaria = models.CharField(max_length=200)
centro_custo = models.CharField(max_length=200)
conta_caixa = models.CharField(max_length=200)
categoria_projeto = models.CharField(max_length=200)
cod_convenio_conta = models.CharField(max_length=200)
cod_status = models.CharField(max_length=200)
ind_sub_projeto = models.CharField(max_length=200)
tipo_custo_op = models.CharField(max_length=200)
projeto_mae = models.CharField(max_length=200)
id_coordenador = models.CharField(max_length=200)
id_financiador = models.CharField(max_length=200)
id_instituicao = models.CharField(max_length=200)
id_departamento = models.CharField(max_length=200)
nome_instituicao = models.CharField(max_length=200)
id_instituicao_executora = models.CharField(max_length=200)
id_tipo = models.CharField(max_length=200)

class Template(models.Model):
nome_template = models.CharField(max_length=200)
endereco_template = models.CharField(max_length=200)
mapeamento = models.ForeignKey(Mapeamento, on_delete=models.CASCADE)

class Report(models.Model):
titulo = models.CharField(max_length=200)
descricao = models.CharField(max_length=200)

TIPO_ERRO_CHOICES = (
('erro1', 'Falta de informação no projeto'),
('erro2', 'Campo preenchido incorretamente'),
# Adicione mais opções conforme necessário
)
tipo_erro = models.CharField(max_length=20, choices=TIPO_ERRO_CHOICES)
id_projeto = models.CharField(max_length=50)
nome_usuario = models.CharField(max_length=200)

class Export(models.Model):
data_export = models.DateTimeField(auto_now_add=True)
formato = models.CharField(max_length=200)
nome_template = models.CharField(max_length=200)
nome_usuario = models.CharField(max_length=200)
id_projeto = models.CharField(max_length=50)
Binary file added project/project/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file not shown.
Binary file added project/project/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Loading

0 comments on commit d187b05

Please sign in to comment.