# Generated by Django 3.2.5 on 2021-09-25 13:22

import ckeditor.fields
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='NguoiDung',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('email', models.CharField(max_length=50, unique=True)),
                ('so_dien_thoai', models.CharField(blank=True, default='', max_length=15)),
                ('anh_dai_dien', models.ImageField(null=True, upload_to='static/upload/%Y/%m')),
                ('vai_tro', models.CharField(choices=[('TUYEN DUNG', 'Nha tuyen dung'), ('UNG VIEN', 'Ung vien'), ('QUAN LY', 'Quan ly')], default='', max_length=10)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'db_table': 'nguoi_dung',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='BangCap',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ten', models.CharField(max_length=50)),
            ],
            options={
                'db_table': 'bang_cap',
            },
        ),
        migrations.CreateModel(
            name='ChucDanh',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ten', models.CharField(max_length=50)),
            ],
            options={
                'db_table': 'chuc_danh',
            },
        ),
        migrations.CreateModel(
            name='KinhNghiem',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ten', models.TextField(max_length=80)),
            ],
            options={
                'db_table': 'kinh_nghiem',
            },
        ),
        migrations.CreateModel(
            name='KyNang',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ten', models.TextField(max_length=50)),
            ],
            options={
                'db_table': 'ky_nang',
            },
        ),
        migrations.CreateModel(
            name='NganhNghe',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ten', models.CharField(max_length=50)),
            ],
            options={
                'db_table': 'nganh_nghe',
            },
        ),
        migrations.CreateModel(
            name='PhucLoi',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ten', models.TextField(max_length=50)),
            ],
            options={
                'db_table': 'phuc_loi',
            },
        ),
        migrations.CreateModel(
            name='NhaTuyenDung',
            fields=[
                ('nguoi_dung', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='viec_lam_app.nguoidung')),
                ('ten_cong_ty', models.CharField(max_length=100)),
                ('dia_chi', models.CharField(max_length=150)),
                ('quy_mo', models.IntegerField(default=0)),
                ('diem_danh_gia_tb', models.FloatField(default=0.0)),
                ('doi_xet_duyet', models.BooleanField(default=True)),
                ('gioi_thieu', ckeditor.fields.RichTextField(null=True)),
            ],
            options={
                'db_table': 'nha_tuyen_dung',
            },
        ),
        migrations.CreateModel(
            name='QuanLy',
            fields=[
                ('nguoi_dung', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='viec_lam_app.nguoidung')),
                ('log', models.TextField(null=True)),
            ],
            options={
                'db_table': 'quan_ly',
            },
        ),
        migrations.CreateModel(
            name='ViecLam',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ngay_tao', models.DateField(auto_now_add=True)),
                ('ngay_het_han', models.DateField()),
                ('noi_dung', ckeditor.fields.RichTextField()),
                ('tieu_de', models.CharField(max_length=80)),
                ('luong', models.IntegerField(default=0)),
                ('trang_thai_viec_lam', models.CharField(choices=[('VI PHAM', 'Viec lam vi pham quy dinh'), ('DA DONG', 'Viec lam khong nhan ho so dang ky nua'), ('DANG MO', 'Viec lam con nhan ho so')], default='DANG MO', max_length=10)),
                ('bang_cap', models.ManyToManyField(to='viec_lam_app.BangCap')),
                ('kinh_nghiem', models.ManyToManyField(to='viec_lam_app.KinhNghiem')),
                ('ky_nang', models.ManyToManyField(to='viec_lam_app.KyNang')),
                ('nganh_nghe', models.ManyToManyField(to='viec_lam_app.NganhNghe')),
                ('phuc_loi', models.ManyToManyField(to='viec_lam_app.PhucLoi')),
                ('nha_tuyen_dung', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='viec_lam_app.nhatuyendung')),
            ],
            options={
                'db_table': 'viec_lam',
            },
        ),
        migrations.CreateModel(
            name='UngVien',
            fields=[
                ('nguoi_dung', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='viec_lam_app.nguoidung')),
                ('ngay_sinh', models.DateField(null=True)),
                ('dia_chi', models.CharField(max_length=150, null=True)),
                ('cv', models.FileField(null=True, upload_to='upload/%Y/%m')),
                ('gioi_thieu', ckeditor.fields.RichTextField(null=True)),
                ('bang_cap', models.ManyToManyField(to='viec_lam_app.BangCap')),
                ('kinh_nghiem', models.ManyToManyField(to='viec_lam_app.KinhNghiem')),
                ('ky_nang', models.ManyToManyField(to='viec_lam_app.KyNang')),
                ('nganh_nghe', models.ManyToManyField(to='viec_lam_app.NganhNghe')),
            ],
            options={
                'db_table': 'ung_vien',
            },
        ),
        migrations.CreateModel(
            name='UngTuyen',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ngay_ung_tuyen', models.DateField(auto_now_add=True)),
                ('trang_thai_ho_so', models.CharField(choices=[('CHAP NHAN', 'Ho so duoc NTD chap nhan'), ('TU CHOI', 'NTD tu choi ho so'), ('CHO XU LY', 'Ho so van dang xu ly')], default='CHO XU LY', max_length=10)),
                ('ung_vien_nop_don', models.BooleanField(default=True)),
                ('viec_lam', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='viec_lam_app.vieclam')),
                ('ung_vien', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='viec_lam_app.ungvien')),
            ],
            options={
                'db_table': 'ung_tuyen',
            },
        ),
        migrations.CreateModel(
            name='DanhGiaNhaTuyenDung',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('noi_dung', models.TextField()),
                ('diem_danh_gia', models.FloatField()),
                ('ngay_tao', models.DateField(auto_now_add=True)),
                ('viec_lam', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='viec_lam_app.vieclam')),
                ('nha_tuyen_dung', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='viec_lam_app.nhatuyendung')),
                ('ung_vien', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='viec_lam_app.ungvien')),
            ],
            options={
                'db_table': 'danh_gia_nha_tuyen_dung',
            },
        ),
    ]
