# Generated by Django 6.0.4 on 2026-06-06 02:55

import apps.asset_management.models
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Asset',
            fields=[
                ('id', models.UUIDField(default=apps.asset_management.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('asset_tag', models.CharField(max_length=100, unique=True)),
                ('serial_number', models.CharField(blank=True, max_length=100)),
                ('status', models.CharField(choices=[('available', 'Available'), ('assigned', 'Assigned'), ('maintenance', 'Maintenance'), ('retired', 'Retired'), ('lost', 'Lost')], default='available', max_length=20)),
                ('purchase_date', models.DateField(blank=True, null=True)),
                ('purchase_price', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True)),
                ('warranty_expiry', models.DateField(blank=True, null=True)),
                ('description', models.TextField(blank=True)),
                ('image', models.ImageField(blank=True, null=True, upload_to='assets/')),
                ('specifications', models.JSONField(default=dict)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'assets',
                'ordering': ['asset_tag'],
            },
        ),
        migrations.CreateModel(
            name='AssetAssignment',
            fields=[
                ('id', models.UUIDField(default=apps.asset_management.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('assigned_date', models.DateField()),
                ('returned_date', models.DateField(blank=True, null=True)),
                ('status', models.CharField(choices=[('assigned', 'Assigned'), ('returned', 'Returned')], default='assigned', max_length=20)),
                ('condition', models.CharField(blank=True, max_length=100)),
                ('notes', models.TextField(blank=True)),
            ],
            options={
                'db_table': 'asset_assignments',
                'ordering': ['-assigned_date'],
            },
        ),
        migrations.CreateModel(
            name='AssetCategory',
            fields=[
                ('id', models.UUIDField(default=apps.asset_management.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('slug', models.SlugField(blank=True, max_length=100, null=True, unique=True)),
                ('name', models.CharField(max_length=100, unique=True)),
                ('description', models.TextField(blank=True)),
                ('depreciation_rate', models.DecimalField(blank=True, decimal_places=2, max_digits=5, null=True)),
            ],
            options={
                'verbose_name_plural': 'Asset Categories',
                'db_table': 'asset_categories',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='AssetDocument',
            fields=[
                ('id', models.UUIDField(default=apps.asset_management.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=255)),
                ('doc_type', models.CharField(choices=[('manual', 'Manual'), ('warranty', 'Guarantee / Warranty Card'), ('invoice', 'Invoice'), ('receipt', 'Receipt'), ('other', 'Other')], default='other', max_length=20)),
                ('file', models.FileField(upload_to='asset_documents/')),
                ('notes', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'db_table': 'asset_documents',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='AssetLocation',
            fields=[
                ('id', models.UUIDField(default=apps.asset_management.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('slug', models.SlugField(blank=True, max_length=255, null=True, unique=True)),
                ('name', models.CharField(max_length=255)),
                ('address', models.TextField(blank=True)),
                ('contact_person', models.CharField(blank=True, max_length=100)),
                ('contact_phone', models.CharField(blank=True, max_length=20)),
            ],
            options={
                'db_table': 'asset_locations',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='AssetTicket',
            fields=[
                ('id', models.UUIDField(default=apps.asset_management.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=255)),
                ('description', models.TextField(blank=True)),
                ('priority', models.CharField(choices=[('low', 'Low'), ('medium', 'Medium'), ('high', 'High'), ('critical', 'Critical')], default='medium', max_length=20)),
                ('status', models.CharField(choices=[('open', 'Open'), ('in_progress', 'In Progress'), ('resolved', 'Resolved'), ('closed', 'Closed')], default='open', max_length=20)),
                ('resolved_at', models.DateTimeField(blank=True, null=True)),
                ('notes', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'asset_tickets',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='Maintenance',
            fields=[
                ('id', models.UUIDField(default=apps.asset_management.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=255)),
                ('description', models.TextField()),
                ('status', models.CharField(choices=[('scheduled', 'Scheduled'), ('in_progress', 'In Progress'), ('completed', 'Completed'), ('cancelled', 'Cancelled')], default='scheduled', max_length=20)),
                ('scheduled_date', models.DateField()),
                ('completed_date', models.DateField(blank=True, null=True)),
                ('cost', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True)),
                ('vendor', models.CharField(blank=True, max_length=255)),
                ('notes', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'db_table': 'maintenance',
                'ordering': ['-scheduled_date'],
            },
        ),
        migrations.CreateModel(
            name='Procurement',
            fields=[
                ('id', models.UUIDField(default=apps.asset_management.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('number', models.CharField(blank=True, max_length=40, unique=True)),
                ('title', models.CharField(max_length=255)),
                ('description', models.TextField(blank=True)),
                ('status', models.CharField(choices=[('draft', 'Draft'), ('pending_approval', 'Pending Approval'), ('approved', 'Approved'), ('ordered', 'Ordered'), ('received', 'Received'), ('cancelled', 'Cancelled')], default='draft', max_length=20)),
                ('category', models.CharField(blank=True, max_length=100)),
                ('quantity', models.IntegerField(default=1)),
                ('estimated_cost', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True)),
                ('actual_cost', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True)),
                ('items', models.JSONField(blank=True, default=list)),
                ('delivery_date', models.DateField(blank=True, null=True)),
                ('notes', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'procurements',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='Vendor',
            fields=[
                ('id', models.UUIDField(default=apps.asset_management.models.uuid7, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('contact_person', models.CharField(blank=True, max_length=100)),
                ('email', models.EmailField(blank=True, max_length=254)),
                ('phone', models.CharField(blank=True, max_length=20)),
                ('address', models.TextField(blank=True)),
                ('tax_id', models.CharField(blank=True, max_length=50)),
                ('bank_details', models.JSONField(default=dict)),
                ('notes', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'db_table': 'vendors',
                'ordering': ['name'],
            },
        ),
    ]
