# Generated by Django 3.0.8 on 2020-07-22 13:01

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import HR_inventory.models


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Vendor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True)),
                ('number', models.CharField(max_length=14, unique=True, validators=[HR_inventory.models.validate_number])),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('address', models.CharField(blank=True, max_length=200, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Software',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('quantity', models.IntegerField(validators=[django.core.validators.MinValueValidator(1)])),
                ('item_type', models.CharField(choices=[('A', 'Application'), ('O', 'OS')], max_length=1)),
                ('start_date', models.DateField(verbose_name='License activation date')),
                ('end_date', models.DateField(blank=True, null=True, verbose_name='License expiration date')),
                ('licensed', models.BooleanField(default=False)),
                ('description', models.CharField(max_length=100)),
                ('users', models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL)),
                ('vendor', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='HR_inventory.Vendor')),
            ],
        ),
        migrations.CreateModel(
            name='Hardware',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('quantity', models.IntegerField(validators=[django.core.validators.MinValueValidator(1)])),
                ('item_type', models.CharField(choices=[('L', 'Laptop'), ('K', 'Keyboard'), ('M', 'Mouse'), ('A', 'Accessory'), ('S', 'Server')], max_length=1)),
                ('warranty', models.IntegerField(validators=[django.core.validators.MinValueValidator(0)], verbose_name='Warranty(in months)')),
                ('mfg_date', models.DateField()),
                ('condition', models.CharField(choices=[('N', 'New'), ('R', 'Refurbished')], max_length=1)),
                ('description', models.CharField(max_length=100)),
                ('users', models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL)),
                ('vendor', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='HR_inventory.Vendor')),
            ],
        ),
    ]
