# Generated by Django 5.2.7 on 2026-03-22 22:06

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


class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Relationship',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('relationship_type', models.CharField(choices=[('OWNED_BY', 'Owned By'), ('ASSOCIATED_WITH', 'Associated With'), ('COMMUNICATED_WITH', 'Communicated With')], max_length=20)),
                ('weight', models.FloatField(default=1.0)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('source_entity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='outbound_relationships', to='core.entity')),
                ('target_entity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='inbound_relationships', to='core.entity')),
            ],
            options={
                'unique_together': {('source_entity', 'target_entity', 'relationship_type')},
            },
        ),
    ]
