<gh_stars>1-10
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-19 14:24
from __future__ import unicode_literals

from django.conf import settings
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),
    ]

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='nome da empresa')),
                ('manager', models.OneToOneField(help_text='Gestor da loja', on_delete=django.db.models.deletion.CASCADE, related_name='company', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'empresa',
                'verbose_name_plural': 'empresas',
            },
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('mobile_id', models.CharField(max_length=255, primary_key=True, serialize=False, verbose_name='código celular')),
                ('first_name', models.CharField(max_length=255, verbose_name='nome')),
                ('last_name', models.CharField(max_length=255, verbose_name='sobrenome')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='criado em')),
                ('modified_at', models.DateTimeField(auto_now=True, verbose_name='modificado em')),
                ('company', models.ForeignKey(help_text='empresa', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='employees', to='core.Company')),
            ],
            options={
                'verbose_name': 'empregado',
                'verbose_name_plural': 'empregados',
            },
        ),
        migrations.CreateModel(
            name='Register',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time', models.DateTimeField(auto_now_add=True, verbose_name='marcação')),
                ('latitude', models.FloatField(default=0, verbose_name='latitude')),
                ('longitude', models.FloatField(default=0, verbose_name='longitude')),
                ('registered_by_manager', models.BooleanField(default=False)),
                ('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='registers', to='core.Employee')),
            ],
            options={
                'verbose_name': 'registro de ponto',
                'ordering': ('time',),
                'verbose_name_plural': 'registros de ponto',
            },
        ),
    ]
