# Generated by Django 6.1 on 2026-08-16 18:14

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('hr_department', '0011_team_background_verification_document_and_more'),
        ('program_department', '0010_project_targets_achieved_followups'),
    ]

    operations = [
        migrations.CreateModel(
            name='Stock_Item',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('item_name', models.CharField(max_length=255)),
                ('category', models.CharField(choices=[('Stationery', 'Stationery'), ('Medical', 'Medical'), ('Training Material', 'Training Material'), ('Other', 'Other')], default='Other', max_length=20)),
                ('unit', models.CharField(choices=[('Pcs', 'Pcs'), ('Box', 'Box'), ('Kg', 'Kg'), ('Ltr', 'Ltr')], default='Pcs', max_length=10)),
                ('reorder_level', models.IntegerField(default=0)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Asset',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('asset_name', models.CharField(max_length=255)),
                ('category', models.CharField(choices=[('Electronics', 'Electronics'), ('Furniture', 'Furniture'), ('Vehicle', 'Vehicle'), ('Other', 'Other')], default='Other', max_length=20)),
                ('asset_tag', models.CharField(max_length=100, unique=True)),
                ('purchase_date', models.DateField(blank=True, null=True)),
                ('purchase_cost', models.CharField(blank=True, default='', max_length=255, null=True)),
                ('condition', models.CharField(choices=[('New', 'New'), ('Good', 'Good'), ('Fair', 'Fair'), ('Damaged', 'Damaged'), ('Written-off', 'Written-off')], default='New', max_length=20)),
                ('status', models.CharField(choices=[('In Store', 'In Store'), ('Issued', 'Issued'), ('Under Repair', 'Under Repair'), ('Disposed', 'Disposed')], default='In Store', max_length=20)),
                ('issue_date', models.DateField(blank=True, null=True)),
                ('return_date', models.DateField(blank=True, null=True)),
                ('warranty_expiry', models.DateField(blank=True, null=True)),
                ('photo', models.ImageField(blank=True, null=True, upload_to='inventory/assets')),
                ('invoice', models.FileField(blank=True, null=True, upload_to='inventory/assets')),
                ('notes', models.TextField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('assigned_to', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='assigned_assets', to='hr_department.team')),
                ('vendor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='hr_department.vendors')),
            ],
        ),
        migrations.CreateModel(
            name='Stock_Transaction',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('transaction_type', models.CharField(choices=[('In', 'In'), ('Out', 'Out')], max_length=10)),
                ('quantity', models.IntegerField()),
                ('date', models.DateField()),
                ('notes', models.CharField(blank=True, default='', max_length=255, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('issued_to', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='hr_department.team')),
                ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='transactions', to='inventory.stock_item')),
                ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='program_department.projects')),
                ('vendor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='hr_department.vendors')),
            ],
        ),
    ]
