# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2018-02-23 21:44
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='categoria',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cod_categoria', models.IntegerField(unique=True, verbose_name='C\xf3digo')),
                ('descricao', models.CharField(max_length=100, unique=True, verbose_name='Descri\xe7\xe3o')),
                ('estado', models.BooleanField(default=True, verbose_name='Activado')),
                ('data_registo', models.DateTimeField(auto_now=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='posto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cod_posto', models.IntegerField(unique=True, verbose_name='C\xf3digo')),
                ('descricao', models.CharField(max_length=100, unique=True, verbose_name='Descri\xe7\xe3o')),
                ('nif', models.CharField(max_length=15, unique=True, verbose_name='N\xfamero de Idenfica\xe7\xe3o Fiscal')),
                ('tel', models.CharField(max_length=20, verbose_name='Telefone')),
                ('email', models.EmailField(default='info@sipa.co.ao', max_length=254, verbose_name='E-mail')),
                ('endereco', models.CharField(max_length=50, verbose_name='Endere\xe7o')),
                ('estado', models.BooleanField(default=True, verbose_name='Activado')),
                ('data_registo', models.DateTimeField(auto_now=True, null=True)),
                ('categoria', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='postos', to='webapi.categoria')),
            ],
            options={
                'ordering': ['descricao'],
            },
        ),
        migrations.AlterField(
            model_name='orgao',
            name='cod_orgao',
            field=models.IntegerField(unique=True, verbose_name='C\xf3digo'),
        ),
        migrations.AlterField(
            model_name='orgao',
            name='data_registo',
            field=models.DateTimeField(auto_now=True, null=True),
        ),
        migrations.AlterField(
            model_name='orgao',
            name='descricao',
            field=models.CharField(max_length=100, unique=True, verbose_name='Descri\xe7\xe3o'),
        ),
        migrations.AlterField(
            model_name='orgao',
            name='site',
            field=models.CharField(default='www.sipa.co.ao', max_length=20, verbose_name='Site'),
        ),
        migrations.AddField(
            model_name='posto',
            name='orgao',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='postos', to='webapi.orgao'),
        ),
        migrations.AlterUniqueTogether(
            name='posto',
            unique_together=set([('orgao', 'descricao', 'categoria')]),
        ),
    ]
