# Generated by Django 3.2.6 on 2021-08-08 08:35

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='StaffRole',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role', models.CharField(max_length=50, verbose_name='Bo phan')),
            ],
        ),
        migrations.CreateModel(
            name='Staff',
            fields=[
                ('staff_id', models.CharField(error_messages={'unique': 'Ma nhan vien da ton tai'}, max_length=10, primary_key=True, serialize=False, verbose_name='Ma nhan vien')),
                ('last_name', models.CharField(max_length=50, verbose_name='Ho')),
                ('first_name', models.CharField(max_length=50, verbose_name='Ten')),
                ('staff_email', models.EmailField(error_messages={'unique': 'Email da duoc su dung'}, max_length=254, unique=True, verbose_name='Email')),
                ('staff_role', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='staff.staffrole', verbose_name='Bo phan')),
                ('user', models.OneToOneField(editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['first_name', 'last_name', 'staff_id'],
            },
        ),
    ]
