# Generated by Django 5.2.8 on 2025-11-25 02:53

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


class Migration(migrations.Migration):

    dependencies = [
        ('inventory', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='StockAdjustment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('adjustment_type', models.CharField(choices=[('restock', 'Restock'), ('reduce', 'Reduce'), ('adjustment', 'Manual Adjustment'), ('damage', 'Damage/Loss'), ('return', 'Return to Stock')], max_length=15)),
                ('quantity', models.IntegerField(help_text='Quantity to add/remove')),
                ('reason', models.TextField(blank=True, help_text='Reason for adjustment')),
                ('reference_number', models.CharField(blank=True, help_text='Reference number', max_length=100)),
                ('performed_by', models.CharField(help_text='User who performed adjustment', max_length=100)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stock_adjustments', to='inventory.product')),
            ],
            options={
                'verbose_name': 'Stock Adjustment',
                'verbose_name_plural': 'Stock Adjustments',
                'ordering': ['-created_at'],
            },
        ),
    ]
