Files
gitrusprusandCursor 85b8b2e9b8 Add conflictology map mode and fix graph rendering reliability.
Support conflict types, involvement sizing, and map-type toggles while keeping polar sector layout; improve GraphView init retries and edge matching on network maps.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 11:51:06 +03:00

53 lines
2.0 KiB
Python

from django.core.validators import MaxValueValidator, MinValueValidator
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contacts', '0008_alter_relation_interaction_intensity'),
]
operations = [
migrations.AddField(
model_name='networkmap',
name='conflictology_enabled',
field=models.BooleanField(default=False, verbose_name='Режим конфликтологии'),
),
migrations.AddField(
model_name='networkmap',
name='conflict_subject',
field=models.CharField(blank=True, max_length=255, verbose_name='Предмет конфликта (центр карты)'),
),
migrations.AddField(
model_name='networkmapmembership',
name='conflict_involvement',
field=models.PositiveSmallIntegerField(
default=3,
validators=[MinValueValidator(1), MaxValueValidator(5)],
verbose_name='Вовлечённость в конфликт (1–5)',
),
),
migrations.AlterField(
model_name='relation',
name='relation_type',
field=models.CharField(
choices=[
('colleague', 'Коллега'),
('friend', 'Друг'),
('family', 'Родственник'),
('acquaintance', 'Знакомый'),
('business', 'Деловой партнёр'),
('other', 'Другое'),
('conflict_open', 'Открытый конфликт'),
('conflict_tension', 'Напряжение'),
('conflict_alliance', 'Союз / поддержка'),
('conflict_neutral', 'Нейтральная связь'),
],
default='acquaintance',
max_length=50,
verbose_name='Тип связи',
),
),
]