# Generated by Django 2.2.7 on 2020-02-29 08:14

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='Machines',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('description', models.CharField(blank=True, default='', max_length=120)),
                ('ip_address', models.CharField(max_length=90)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('manager', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Machines',
                'verbose_name_plural': 'Machines List',
                'db_table': 'machines_list',
            },
        ),
        migrations.CreateModel(
            name='MailAccount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email', models.CharField(max_length=50)),
                ('sender_name', models.CharField(blank=True, max_length=70)),
                ('user_id', models.CharField(blank=True, max_length=50)),
                ('access_token', models.CharField(blank=True, max_length=250)),
                ('detail', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Email',
                'verbose_name_plural': 'Emails',
                'db_table': 'mail_account',
                'unique_together': {('email',)},
            },
        ),
        migrations.CreateModel(
            name='MachineStates',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.FloatField()),
                ('machine_time', models.DateTimeField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('machine', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dashboard.Machines')),
            ],
            options={
                'verbose_name': 'Machines Status',
                'verbose_name_plural': 'Machines Status List',
                'db_table': 'machines_state',
            },
        ),
        migrations.CreateModel(
            name='MailAccountUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mail_account', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='dashboard.MailAccount')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Assigned Email',
                'verbose_name_plural': 'Assigned Emails',
                'db_table': 'mail_account_user',
                'unique_together': {('mail_account',)},
            },
        ),
    ]
