# Generated by Django 5.2.4 on 2025-08-22 12:03

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


class Migration(migrations.Migration):

    dependencies = [
        ('companies', '0005_remove_company_catch_phrases_catchphrase'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='CompanyHistory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('action', models.CharField(help_text='Action performed: created, updated, deleted', max_length=50)),
                ('model_name', models.CharField(help_text='Name of the model that was changed', max_length=100)),
                ('object_id', models.IntegerField(help_text='ID of the changed object')),
                ('details', models.TextField(help_text='Human readable description of what changed')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='history', to='companies.company')),
                ('updated_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='company_actions', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Company History',
                'ordering': ['-created_at'],
            },
        ),
    ]
