Пример #1
0
class Migration(migrations.Migration):

    dependencies = [
        ('aplic', '0006_curso_imagem'),
    ]

    operations = [
        migrations.AlterField(
            model_name='curso',
            name='imagem',
            field=stdimage.models.StdImageField(
                blank=True,
                null=True,
                upload_to=aplic.models.get_file_path,
                verbose_name='Imagem'),
        ),
        migrations.AlterField(
            model_name='disciplina',
            name='curso',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='disciplinas',
                to='aplic.Curso'),
        ),
    ]
Пример #2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Medicamento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('codigo', models.IntegerField(unique=True, verbose_name='Codigo')),
                ('nome', models.CharField(max_length=200, verbose_name='Nome:')),
                ('descricao', models.TextField(blank=True, max_length=2000, verbose_name='Descricão:')),
            ],
            options={
                'verbose_name': 'Medicamento',
                'verbose_name_plural': 'Medicamentos',
            },
        ),
        migrations.CreateModel(
            name='Medico',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cpf', models.CharField(max_length=11, unique=True, verbose_name='Cpf:')),
                ('nome', models.CharField(max_length=200, verbose_name='Nome:')),
                ('logradouro', models.CharField(max_length=200, verbose_name='Logradouro:')),
                ('bairro', models.CharField(max_length=200, verbose_name='Bairro:')),
                ('cidade', models.CharField(max_length=200, verbose_name='Cidade:')),
                ('estado', models.CharField(choices=[('AC', 'Acre'), ('AL', 'Alagoas'), ('AP', 'Amapá'), ('AM', 'Amazonas'), ('BA', 'Bahia'), ('CE', 'Ceará'), ('DF', 'Distrito Federal'), ('ES', 'Espírito Santo'), ('GO', 'Goiás'), ('MA', 'Maranhão'), ('MT', 'Mato Grosso'), ('MS', 'Mato Grosso do Sul'), ('MG', 'Minas Gerais'), ('PA', 'Pará'), ('PB', 'Paraíba'), ('PR', 'Paraná'), ('PE', 'Pernambuco'), ('PI', 'Piauí'), ('RJ', 'Rio de Janeiro'), ('RN', 'Rio Grande do Norte'), ('RS', 'Rio Grande do Sul'), ('RO', 'Rondônia'), ('RR', 'Roraima'), ('SC', 'Santa Catarina'), ('SP', 'São Paulo'), ('SE', 'Sergipe'), ('TO', 'Tocantins')], max_length=100, verbose_name='Estado:')),
                ('email', models.EmailField(max_length=200, verbose_name='Email:')),
                ('telefoneComercial', models.CharField(max_length=200, verbose_name='Telefone Comercial:')),
                ('telefoneResidencial', models.CharField(max_length=200, verbose_name='Telefone Residencial:')),
                ('telefoneCelular', models.CharField(max_length=200, verbose_name='Celular:')),
                ('idade', models.IntegerField(verbose_name='Idade:')),
                ('foto', stdimage.models.StdImageField(blank=True, null=True, upload_to=aplic.models.get_file_path, verbose_name='Foto:')),
                ('especialidades', models.CharField(choices=[('Cirurgiao', 'Cirurgiao'), ('Clinico Geral', 'Clinico Geral'), ('Pediatra', 'Pediatra'), ('Cardiologista', 'Cardiologista')], max_length=100, verbose_name='Especialidade:')),
                ('crm', models.CharField(max_length=20, unique=True, verbose_name='CRM:')),
            ],
            options={
                'verbose_name': 'Medico',
                'verbose_name_plural': 'Medicos',
            },
        ),
        migrations.CreateModel(
            name='Paciente',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cpf', models.CharField(max_length=11, unique=True, verbose_name='Cpf:')),
                ('nome', models.CharField(max_length=200, verbose_name='Nome:')),
                ('logradouro', models.CharField(max_length=200, verbose_name='Logradouro:')),
                ('bairro', models.CharField(max_length=200, verbose_name='Bairro:')),
                ('cidade', models.CharField(max_length=200, verbose_name='Cidade:')),
                ('estado', models.CharField(choices=[('AC', 'Acre'), ('AL', 'Alagoas'), ('AP', 'Amapá'), ('AM', 'Amazonas'), ('BA', 'Bahia'), ('CE', 'Ceará'), ('DF', 'Distrito Federal'), ('ES', 'Espírito Santo'), ('GO', 'Goiás'), ('MA', 'Maranhão'), ('MT', 'Mato Grosso'), ('MS', 'Mato Grosso do Sul'), ('MG', 'Minas Gerais'), ('PA', 'Pará'), ('PB', 'Paraíba'), ('PR', 'Paraná'), ('PE', 'Pernambuco'), ('PI', 'Piauí'), ('RJ', 'Rio de Janeiro'), ('RN', 'Rio Grande do Norte'), ('RS', 'Rio Grande do Sul'), ('RO', 'Rondônia'), ('RR', 'Roraima'), ('SC', 'Santa Catarina'), ('SP', 'São Paulo'), ('SE', 'Sergipe'), ('TO', 'Tocantins')], max_length=100, verbose_name='Estado:')),
                ('email', models.EmailField(max_length=200, verbose_name='Email:')),
                ('telefoneComercial', models.CharField(max_length=200, verbose_name='Telefone Comercial:')),
                ('telefoneResidencial', models.CharField(max_length=200, verbose_name='Telefone Residencial:')),
                ('telefoneCelular', models.CharField(max_length=200, verbose_name='Celular:')),
                ('idade', models.IntegerField(verbose_name='Idade:')),
                ('foto', stdimage.models.StdImageField(blank=True, null=True, upload_to=aplic.models.get_file_path, verbose_name='Foto:')),
                ('codigo', models.IntegerField(unique=True, verbose_name='Codigo')),
                ('dtPrimeiraConsulta', models.DateField(verbose_name='Data da Primeira Consulta:')),
            ],
            options={
                'verbose_name': 'Paciente',
                'verbose_name_plural': 'Pacientes',
            },
        ),
        migrations.CreateModel(
            name='Receita',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descricao', models.TextField(blank=True, max_length=2000, verbose_name='Como usar:')),
                ('Medicamento', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='aplic.Medicamento')),
                ('Paciente', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='aplic.Paciente')),
                ('medico', models.ManyToManyField(to='aplic.Medico')),
            ],
            options={
                'verbose_name': 'Receita',
                'verbose_name_plural': 'Receitas',
            },
        ),
        migrations.CreateModel(
            name='Consulta',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('codigo', models.IntegerField(unique=True, verbose_name='Codigo')),
                ('data', models.DateTimeField(blank=True, help_text='formato DD/MM/AAAA', null=True, verbose_name='Data/Hora Consulta:')),
                ('descricao', models.TextField(blank=True, max_length=2000, verbose_name='Descricao:')),
                ('Paciente', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='aplic.Paciente')),
                ('medico', models.ManyToManyField(to='aplic.Medico')),
            ],
            options={
                'verbose_name': 'Consulta',
                'verbose_name_plural': 'Consultas',
            },
        ),
    ]
Пример #3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Endereco',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('logradouro', models.CharField(max_length=50, verbose_name='Logradouro')),
                ('cidade', models.CharField(max_length=50, verbose_name='Cidade')),
                ('bairro', models.CharField(max_length=50, verbose_name='Bairro')),
                ('estado', models.CharField(max_length=40, verbose_name='Estado')),
                ('complemento', models.CharField(blank=True, max_length=10, verbose_name='Complemento')),
                ('numero', models.IntegerField(verbose_name='Número')),
                ('cep', models.CharField(max_length=9, verbose_name='CEP')),
            ],
            options={
                'verbose_name': 'Endereço',
                'verbose_name_plural': 'Endereços',
            },
        ),
        migrations.CreateModel(
            name='Funcionario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=50, verbose_name='Nome')),
                ('cpf', models.CharField(max_length=11, verbose_name='CPF')),
                ('telefone', models.CharField(help_text='DD NNNNN-NNNN', max_length=13, verbose_name='Número celular')),
                ('foto', stdimage.models.StdImageField(blank=True, null=True, upload_to=aplic.models.get_file_path, verbose_name='Foto')),
                ('data_nasc', models.DateField(verbose_name='Data de Nascimento')),
                ('facebook', models.CharField(blank=True, max_length=200, verbose_name='Facebook')),
                ('twitter', models.CharField(blank=True, max_length=200, verbose_name='Twitter')),
                ('instagram', models.CharField(blank=True, max_length=200, verbose_name='Instagram')),
                ('endereco', models.ManyToManyField(to='aplic.Endereco')),
            ],
            options={
                'verbose_name': 'Funcionário',
                'verbose_name_plural': 'Funcionários',
            },
        ),
        migrations.CreateModel(
            name='Galeria',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=50, verbose_name='Nome da foto')),
                ('foto', stdimage.models.StdImageField(blank=True, null=True, upload_to=aplic.models.get_file_path, verbose_name='Foto')),
            ],
            options={
                'verbose_name': 'Foto da Galeria',
                'verbose_name_plural': 'Fotos da Galeria',
            },
        ),
        migrations.CreateModel(
            name='Pedido',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantidade_produto', models.IntegerField(verbose_name='Quantidade do produto')),
                ('data', models.DateField(verbose_name='Data')),
                ('status', models.CharField(choices=[('Aceito', 'Aceito'), ('Recusado', 'Recusado')], max_length=20, verbose_name='Status')),
                ('valor_total_pedido', models.FloatField(verbose_name='Valor total do pedido')),
            ],
            options={
                'verbose_name': 'Pedido',
                'verbose_name_plural': 'Pedidos',
            },
        ),
        migrations.CreateModel(
            name='Produto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(max_length=55, verbose_name='Nome do produto')),
                ('foto', stdimage.models.StdImageField(blank=True, null=True, upload_to=aplic.models.get_file_path, verbose_name='Foto')),
                ('disponibilidade', models.BooleanField(verbose_name='Disponibilidade')),
            ],
            options={
                'verbose_name': 'Produto',
                'verbose_name_plural': 'Produtos',
            },
        ),
        migrations.CreateModel(
            name='Revendedora',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cnpj', models.IntegerField(unique=True, verbose_name='CNPJ')),
                ('nome', models.CharField(max_length=50, verbose_name='Nome')),
                ('foto', stdimage.models.StdImageField(blank=True, null=True, upload_to=aplic.models.get_file_path, verbose_name='Foto')),
                ('facebook', models.CharField(blank=True, max_length=200, verbose_name='Facebook')),
                ('twitter', models.CharField(blank=True, max_length=200, verbose_name='Twitter')),
                ('instagram', models.CharField(blank=True, max_length=200, verbose_name='Instagram')),
                ('endereco', models.ManyToManyField(to='aplic.Endereco')),
            ],
            options={
                'verbose_name': 'Revendedora',
                'verbose_name_plural': 'Revendedoras',
            },
        ),
        migrations.CreateModel(
            name='Estoquista',
            fields=[
                ('funcionario_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='aplic.Funcionario')),
                ('salario', models.CharField(max_length=10, verbose_name='Salário')),
            ],
            options={
                'verbose_name': 'Estoquista',
                'verbose_name_plural': 'Estoquistas',
            },
            bases=('aplic.funcionario',),
        ),
        migrations.CreateModel(
            name='Gerente',
            fields=[
                ('funcionario_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='aplic.Funcionario')),
                ('salario', models.CharField(max_length=10, verbose_name='Salário')),
            ],
            options={
                'verbose_name': 'Gerente',
                'verbose_name_plural': 'Gerentes',
            },
            bases=('aplic.funcionario',),
        ),
        migrations.CreateModel(
            name='Motorista',
            fields=[
                ('funcionario_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='aplic.Funcionario')),
                ('cnh', models.CharField(max_length=11, verbose_name='CNH')),
                ('salario', models.CharField(max_length=10, verbose_name='Salário')),
            ],
            options={
                'verbose_name': 'Motorista',
                'verbose_name_plural': 'Motoristas',
            },
            bases=('aplic.funcionario',),
        ),
        migrations.CreateModel(
            name='Venda',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('valor_total_vendido', models.CharField(max_length=10, verbose_name='Valor total da venda')),
                ('pedido_id', models.ManyToManyField(to='aplic.Pedido')),
                ('revendedora_id', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='aplic.Revendedora')),
            ],
            options={
                'verbose_name': 'Venda',
                'verbose_name_plural': 'Vendas',
            },
        ),
        migrations.CreateModel(
            name='ProdutoPedido',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pedido_id', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='aplic.Pedido')),
                ('produto_id', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='aplic.Produto')),
            ],
        ),
        migrations.AddField(
            model_name='pedido',
            name='produto_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='aplic.Produto'),
        ),
        migrations.AddField(
            model_name='pedido',
            name='revendedora_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='aplic.Revendedora'),
        ),
        migrations.CreateModel(
            name='Entrega',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data_entrega', models.DateField(verbose_name='Data da Entrega')),
                ('melhor_horario', models.TimeField(verbose_name='Melhor horário para entrega')),
                ('valor_entrega', models.CharField(max_length=7, verbose_name='Valor frete')),
                ('venda', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='aplic.Venda')),
                ('motorista', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='aplic.Motorista')),
            ],
            options={
                'verbose_name': 'Entrega',
                'verbose_name_plural': 'Entregas',
            },
        ),
    ]
Пример #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Campus',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('external_id',
                 models.UUIDField(default=uuid.uuid4, editable=False)),
                ('cep', models.CharField(max_length=9, verbose_name='CEP')),
                ('logradouro',
                 models.CharField(max_length=255, verbose_name='Logradouro')),
                ('numero', models.CharField(max_length=9,
                                            verbose_name='Numero')),
                ('complemento',
                 models.CharField(blank=True,
                                  max_length=255,
                                  verbose_name='Complemento')),
                ('bairro',
                 models.CharField(max_length=55, verbose_name='Bairro')),
                ('cidade',
                 models.CharField(max_length=55, verbose_name='Cidade')),
                ('create_at', models.DateTimeField(auto_now_add=True)),
                ('update_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Campus',
                'verbose_name_plural': 'Campus',
            },
        ),
        migrations.CreateModel(
            name='CategoriaAtividadeComplementar',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('external_id',
                 models.UUIDField(default=uuid.uuid4, editable=False)),
                ('macroatividades',
                 models.CharField(max_length=55,
                                  verbose_name='Macroatividades')),
                ('carga_horaria_maxima_categoria',
                 models.IntegerField(
                     verbose_name=
                     'Carga Horária Máxima da Categoria para este Curso')),
                ('descricao',
                 models.TextField(blank=True,
                                  max_length=500,
                                  null=True,
                                  verbose_name='Descrição')),
                ('create_at', models.DateTimeField(auto_now_add=True)),
                ('update_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Categoria Atividade Complementar',
                'verbose_name_plural': 'Categorias Atividades Complementares',
            },
        ),
        migrations.CreateModel(
            name='Estado',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('external_id',
                 models.UUIDField(default=uuid.uuid4, editable=False)),
                ('uf',
                 models.CharField(max_length=2, unique=True,
                                  verbose_name='UF')),
                ('estado',
                 models.CharField(max_length=55, verbose_name='Estado')),
            ],
            options={
                'verbose_name': 'Estado',
                'verbose_name_plural': 'Estados',
            },
        ),
        migrations.CreateModel(
            name='Instituicao',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('external_id',
                 models.UUIDField(default=uuid.uuid4, editable=False)),
                ('nome', models.CharField(max_length=255,
                                          verbose_name='Nome')),
            ],
            options={
                'verbose_name': 'Instituição',
                'verbose_name_plural': 'Instituições',
            },
        ),
        migrations.CreateModel(
            name='Usuario',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('external_id',
                 models.UUIDField(default=uuid.uuid4, editable=False)),
                ('nome', models.CharField(max_length=55, verbose_name='Nome')),
                ('sobrenome',
                 models.CharField(max_length=255, verbose_name='Sobrenome')),
                ('email',
                 models.EmailField(max_length=255, verbose_name='Email')),
                ('senha', models.CharField(max_length=55,
                                           verbose_name='Senha')),
                ('create_at', models.DateTimeField(auto_now_add=True)),
                ('update_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Usuário',
                'verbose_name_plural': 'Usuários',
            },
        ),
        migrations.CreateModel(
            name='Aluno',
            fields=[
                ('usuario_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='aplic.Usuario')),
                ('matricula', models.CharField(max_length=55, unique=True)),
            ],
            options={
                'verbose_name': 'Aluno',
                'verbose_name_plural': 'Alunos',
            },
            bases=('aplic.usuario', ),
        ),
        migrations.CreateModel(
            name='Curso',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('external_id',
                 models.UUIDField(default=uuid.uuid4, editable=False)),
                ('nome', models.CharField(max_length=55, verbose_name='Nome')),
                ('minimo_categorias',
                 models.IntegerField(
                     verbose_name='Quantidade Mínima de Categorias')),
                ('create_at', models.DateTimeField(auto_now_add=True)),
                ('update_at', models.DateTimeField(auto_now=True)),
                ('campus',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='aplic.Campus')),
            ],
            options={
                'verbose_name': 'Curso',
                'verbose_name_plural': 'Cursos',
            },
        ),
        migrations.CreateModel(
            name='CategoriaCurso',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('external_id',
                 models.UUIDField(default=uuid.uuid4, editable=False)),
                ('create_at', models.DateTimeField(auto_now_add=True)),
                ('update_at', models.DateTimeField(auto_now=True)),
                ('categoria_atividade_complementar',
                 models.ManyToManyField(
                     to='aplic.CategoriaAtividadeComplementar')),
                ('curso',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='aplic.Curso')),
            ],
            options={
                'verbose_name': 'Categoria Curso',
                'verbose_name_plural': 'Categorias Cursos',
            },
        ),
        migrations.AddField(
            model_name='campus',
            name='estado',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='aplic.Estado'),
        ),
        migrations.AddField(
            model_name='campus',
            name='instituicao',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name='campus',
                to='aplic.Instituicao'),
        ),
        migrations.CreateModel(
            name='AtividadeComplementar',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('external_id',
                 models.UUIDField(default=uuid.uuid4, editable=False)),
                ('descricao',
                 models.CharField(max_length=255, verbose_name='Descrição')),
                ('empresa',
                 models.CharField(max_length=55,
                                  verbose_name='Empresa/Instituição')),
                ('carga_horaria_informada',
                 models.IntegerField(verbose_name='Carga Horária Informada')),
                ('carga_horaria_integralizada',
                 models.IntegerField(
                     blank=True,
                     null=True,
                     verbose_name='Carga Horária Integralizada')),
                ('certificado_img',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to=aplic.models.get_file_path,
                                  verbose_name='Certificado')),
                ('create_at', models.DateTimeField(auto_now_add=True)),
                ('update_at', models.DateTimeField(auto_now=True)),
                ('categoria',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='aplic.CategoriaCurso')),
                ('aluno',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='aplic.Aluno')),
            ],
            options={
                'verbose_name': 'Atividade Complementar',
                'verbose_name_plural': 'Atividades Complementares',
            },
        ),
        migrations.AddField(
            model_name='aluno',
            name='curso',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='aplic.Curso'),
        ),
    ]
Пример #5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Campeonato',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nome', models.CharField(max_length=100,
                                          verbose_name='Nome')),
                ('dataInicio',
                 models.DateField(verbose_name='Data de Início')),
                ('dataTermino',
                 models.DateField(verbose_name='Data de Término')),
                ('regras', models.TextField(verbose_name='Regras')),
                ('premiacao', models.TextField(verbose_name='Premiação')),
            ],
            options={
                'verbose_name': 'Campeonato',
                'verbose_name_plural': 'Campeonatos',
            },
        ),
        migrations.CreateModel(
            name='Jogo',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nome', models.CharField(max_length=100,
                                          verbose_name='Nome')),
                ('categoria',
                 models.CharField(choices=[('MOBA', 'MOBA'), ('FPS', 'FPS'),
                                           ('Battle Royale', 'Battle Royale'),
                                           ('Esporte', 'Esporte')],
                                  max_length=30,
                                  verbose_name='Categoria')),
                ('desenvolvedor',
                 models.CharField(choices=[('RIOT', 'RIOT GAMES'),
                                           ('GARENA', 'GARENA'),
                                           ('VALVE', 'VALVE'),
                                           ('EPIC GAMES', 'EPIC GAMES'),
                                           ('EA SPORTS', 'EASPORTS'),
                                           ('PUBG CORPORATION',
                                            'PUBG CORPORATION')],
                                  max_length=30,
                                  verbose_name='Desenvolvedor')),
            ],
            options={
                'verbose_name': 'Jogo',
                'verbose_name_plural': 'Jogos',
            },
        ),
        migrations.CreateModel(
            name='Organizador',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('idade', models.IntegerField(verbose_name='idade')),
                ('foto',
                 stdimage.models.StdImageField(
                     blank=True,
                     null=True,
                     upload_to=aplic.models.get_file_path,
                     verbose_name='Foto')),
                ('nome', models.CharField(max_length=100,
                                          verbose_name='Nome')),
                ('cpf', models.CharField(max_length=11, verbose_name='CPF')),
            ],
            options={
                'verbose_name': 'Organizador',
                'verbose_name_plural': 'Organizadores',
            },
        ),
        migrations.CreateModel(
            name='Time',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nome', models.CharField(max_length=100,
                                          verbose_name='Nome')),
                ('sigla', models.CharField(max_length=5,
                                           verbose_name='Sigla')),
                ('bandeira',
                 stdimage.models.StdImageField(
                     blank=True,
                     null=True,
                     upload_to=aplic.models.get_file_path,
                     verbose_name='Foto')),
            ],
            options={
                'verbose_name': 'Time',
                'verbose_name_plural': 'Times',
            },
        ),
        migrations.CreateModel(
            name='Tecnico',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nome', models.CharField(max_length=100,
                                          verbose_name='Nome')),
                ('idade', models.IntegerField(verbose_name='idade')),
                ('cpf',
                 models.CharField(max_length=11,
                                  unique=True,
                                  verbose_name='CPF')),
                ('foto',
                 stdimage.models.StdImageField(
                     blank=True,
                     null=True,
                     upload_to=aplic.models.get_file_path,
                     verbose_name='Foto')),
                ('jogo',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='aplic.Jogo')),
                ('time',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='aplic.Time')),
            ],
            options={
                'verbose_name': 'Técnico',
                'verbose_name_plural': 'Técnicos',
            },
        ),
        migrations.CreateModel(
            name='Partida',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nome', models.CharField(max_length=100,
                                          verbose_name='Nome')),
                ('data', models.DateField(verbose_name='Data')),
                ('horario', models.TimeField(verbose_name='Horário')),
                ('campeonato',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='aplic.Campeonato')),
                ('jogo',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='aplic.Jogo')),
                ('time', models.ManyToManyField(max_length=50,
                                                to='aplic.Time')),
            ],
            options={
                'verbose_name': 'Partida',
                'verbose_name_plural': 'Partidas',
            },
        ),
        migrations.CreateModel(
            name='Competidor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nome', models.CharField(max_length=100,
                                          verbose_name='Nome')),
                ('idade', models.IntegerField(verbose_name='idade')),
                ('cpf',
                 models.CharField(max_length=11,
                                  unique=True,
                                  verbose_name='CPF')),
                ('foto',
                 stdimage.models.StdImageField(
                     blank=True,
                     null=True,
                     upload_to=aplic.models.get_file_path,
                     verbose_name='Foto')),
                ('jogo',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='aplic.Jogo')),
                ('time',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='aplic.Time')),
            ],
            options={
                'verbose_name': 'Competidor',
                'verbose_name_plural': 'Competidores',
            },
        ),
        migrations.AddField(
            model_name='campeonato',
            name='jogo',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='aplic.Jogo'),
        ),
        migrations.AddField(
            model_name='campeonato',
            name='organizador',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='aplic.Organizador'),
        ),
    ]