# Generated by Django 2.0.2 on 2018-02-16 06:37

import datetime
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Cug',
            fields=[
                ('cug_number', models.CharField(max_length=10, primary_key=True, serialize=False, unique=True, validators=[django.core.validators.RegexValidator('^[0-9]{1,10}$', 'Only Numbers and Upper are allowed (max. 6)')])),
                ('paln', models.IntegerField(default=0, validators=[django.core.validators.RegexValidator('^[0-9]{1,5}$', 'Only Numbers and Upper are allowed (max. 6)')])),
                ('pub_date', models.DateTimeField(default=datetime.datetime.now, verbose_name='date published')),
            ],
        ),
        migrations.CreateModel(
            name='Department',
            fields=[
                ('department_number', models.CharField(max_length=10, primary_key=True, serialize=False, unique=True, validators=[django.core.validators.RegexValidator('^[0-9]{1,6}$', 'Only Numbers and Upper are allowed (max. 6)')])),
                ('departmnet_name', models.CharField(max_length=200, unique=True)),
                ('departmnet_short_name', models.CharField(max_length=100, unique=True)),
                ('pub_date', models.DateTimeField(default=datetime.datetime.now, verbose_name='date published')),
            ],
        ),
        migrations.CreateModel(
            name='Designation',
            fields=[
                ('designation_number', models.CharField(max_length=10, primary_key=True, serialize=False, unique=True, validators=[django.core.validators.RegexValidator('^[0-9]{1,6}$', 'Only Numbers and Upper are allowed (max. 6)')])),
                ('designation_name', models.CharField(max_length=200, unique=True)),
                ('pub_date', models.DateTimeField(default=datetime.datetime.now, verbose_name='date published')),
            ],
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('employee_id', models.CharField(max_length=10, primary_key=True, serialize=False, unique=True, validators=[django.core.validators.RegexValidator('^[0-9]{1,10}$', 'Only Numbers and Upper are allowed (max. 6)')])),
                ('name', models.CharField(max_length=200)),
                ('personal_phone_no', models.CharField(max_length=12, unique=True, validators=[django.core.validators.RegexValidator('^[0-9]{1,12}$', 'Only Numbers and Upper are allowed (max. 6)')])),
                ('email_id', models.EmailField(max_length=254, unique=True)),
                ('pub_date', models.DateTimeField(default=datetime.datetime.now, verbose_name='date published')),
                ('department_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='emp.Department')),
                ('designation_no', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='emp.Designation')),
            ],
        ),
        migrations.CreateModel(
            name='Intercom',
            fields=[
                ('intercom_number', models.CharField(max_length=4, primary_key=True, serialize=False, unique=True, validators=[django.core.validators.RegexValidator('^[0-9]{1,4}$', 'Only Numbers and Upper are allowed (max. 6)')])),
                ('pub_date', models.DateTimeField(default=datetime.datetime.now, verbose_name='date published')),
                ('emp_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='emp.Employee')),
            ],
        ),
        migrations.CreateModel(
            name='Quarter',
            fields=[
                ('quarter_number', models.CharField(max_length=10, primary_key=True, serialize=False, unique=True, validators=[django.core.validators.RegexValidator('^[0-9]{1,10}$', 'Only Numbers and Upper are allowed (max. 6)')])),
                ('pub_date', models.DateTimeField(default=datetime.datetime.now, verbose_name='date published')),
                ('emp_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='emp.Employee')),
            ],
        ),
        migrations.AddField(
            model_name='cug',
            name='emp_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='emp.Employee'),
        ),
    ]
