# Модель данных платформы

## Зачем нужна модель данных

Модель данных нужна, чтобы Эволюция не превратилась в набор страниц. Каждая сущность платформы должна иметь устойчивое место, связи и понятный следующий шаг.

## Базовые сущности

### Council

Совет — контур ответственности и действия.

Поля:

- id
- title
- shortTitle
- description
- themes
- relatedProjectIds
- relatedEventIds
- relatedTvMaterialIds
- ctaHref

Утверждённые councilId должны быть устойчивыми и не меняться без решения команды.

### Region

Регион связывает карту, проекты, события, ТВ, деятельность КЦ и маршрут участника.

Поля:

- id
- title
- federalDistrict
- capital
- cities
- centerPoint
- isActive
- relatedCouncilIds
- tags

### City

Город является уточнением внутри региона.

Поля:

- id
- title
- regionId
- point
- isActive

### PlatformObject

Проект или инициатива в Реестре / на Карте.

Поля:

- id
- title
- summary
- description
- regionId
- city
- councilId / relatedCouncilIds
- category
- status
- mapPoint
- contact / externalUrl
- tags

### ProjectStory

История развития проекта хранится отдельно от PlatformObject, чтобы не перегружать карточку проекта.

Поля:

- id
- projectId
- title
- summary
- currentStage
- status
- regionId
- city
- relatedCouncilIds
- relatedTvMaterialIds
- relatedEventIds
- externalSources
- milestones
- updates

### ProjectMilestone

Этап пути проекта.

Поля:

- id
- title
- description
- date
- status
- stage
- relatedTvMaterialId
- relatedEventId
- relatedDocumentUrl

Статусы:

- planned
- in_progress
- completed
- paused

Стадии:

- idea
- research
- land
- design
- partners
- public_discussion
- participants
- construction
- launch
- scaling

### ProjectUpdate

Новость / обновление проекта.

Поля:

- id
- title
- date
- summary
- type
- relatedTvMaterialId
- relatedEventId
- externalUrl

Типы:

- news
- meeting
- media
- map
- registry
- document
- funding
- construction
- education
- partner

### TVMaterial

Материал Эволюция ТВ.

Поля:

- id
- title
- type
- summary
- description
- date
- relatedProjectIds
- relatedCouncilIds
- relatedRegionIds
- relatedEventIds
- nextActions
- videoUrl
- coverImage
- tags

### CenterActivityItem

Пульс Эволюции.

Поля:

- id
- title
- type
- date
- status
- summary
- description
- regionId
- city
- relatedCouncilIds
- relatedProjectIds
- relatedTvMaterialIds
- relatedEventIds
- relatedDocumentUrls
- externalUrl
- ctaLabel
- ctaHref

Типы:

- public_meeting
- round_table
- council_session
- project_launch
- territory_update
- education_event
- tv_release
- registry_update
- map_update
- resolution
- partner_update
- field_visit

### UserProfile

Профиль участника, созданный через онбординг.

Поля:

- id
- role
- regionId
- city
- interests
- needs
- canOffer
- councilIds
- preferredFormats
- availability
- contact

### PersonalRoute

Личный маршрут участника.

Поля:

- id
- userProfileId
- primaryCouncilIds
- regionId
- recommendedProjectIds
- recommendedEventIds
- recommendedTvMaterialIds
- nextSteps
- createdAt
- updatedAt

### Recommendation

Объяснимая рекомендация.

Поля:

- id
- entityType
- entityId
- score
- reasons
- reasonText
- nextAction
- ctaHref

### Application

Заявка как начало сопровождения.

Поля:

- id
- type
- status
- title
- summary
- createdAt
- updatedAt
- userName
- userContact
- sourcePage
- relatedCouncilId
- relatedRegionId / regionId
- relatedProjectId / relatedObjectId
- relatedProductId
- relatedEventId
- relatedTvMaterialId
- nextStep
- coordinatorNote
- history / statusLog

Типы заявок:

- entry_diagnostic
- connection_request
- project_application
- product_application
- media_coverage_request
- tv_author_application
- tv_material_submission
- tv_guest_application
- tv_event_coverage_request
- event_registration
- help_offer
- verification_request
- support_request
- gr_request

Статусы:

- new
- in_review
- needs_info
- in_progress
- approved
- completed
- archived
- declined

## Принцип доверия

Ни одна публичная сущность не должна появляться без ясного статуса. Если проект находится в Реестре, должен быть понятен его уровень подтверждения. Если проект отображается на Карте, должно быть понятно, почему он связан с этим регионом. Если материал ТВ ведёт к заявке, должен быть понятен следующий шаг.

## Что должен проверить Antigravity

- Фактические имена типов и интерфейсов.
- Какие поля уже есть в коде.
- Где есть старые id.
- Где есть null/undefined risks.
- Какие связи нужно добавить в audit script.
- Какие модели ещё только описаны, но не реализованы.
