# Generated by Django 4.0.1 on 2022-01-17 11:21

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Desktop',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('desktop_name', models.CharField(max_length=10, verbose_name='Номер рабочего места')),
            ],
            options={
                'verbose_name': 'Место',
                'verbose_name_plural': 'Места',
            },
        ),
        migrations.CreateModel(
            name='Booking',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('datetime_from', models.DateTimeField(verbose_name='Дата начала сеанса')),
                ('datetime_to', models.DateTimeField(verbose_name='Дата окончания сеанса')),
                ('desktop', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.desktop', verbose_name='Рабочее место')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bookings', to=settings.AUTH_USER_MODEL, verbose_name='Сотрудник')),
            ],
            options={
                'verbose_name': 'Бронирование',
                'verbose_name_plural': 'Бронирования',
            },
        ),
    ]

# Generated by Django 4.0.1 on 2022-01-17 11:21

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Desktop',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('desktop_name', models.CharField(max_length=10, verbose_name='Номер рабочего места')),
            ],
            options={
                'verbose_name': 'Место',
                'verbose_name_plural': 'Места',
            },
        ),
        migrations.CreateModel(
            name='Booking',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('datetime_from', models.DateTimeField(verbose_name='Дата начала сеанса')),
                ('datetime_to', models.DateTimeField(verbose_name='Дата окончания сеанса')),
                ('desktop', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.desktop', verbose_name='Рабочее место')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bookings', to=settings.AUTH_USER_MODEL, verbose_name='Сотрудник')),
            ],
            options={
                'verbose_name': 'Бронирование',
                'verbose_name_plural': 'Бронирования',
            },
        ),
    ]

# Generated by Django 4.0.1 on 2022-01-17 11:21