4.2 KiB
4.2 KiB
NoteFlow Domain Entities
Location
src/noteflow/domain/entities/ and domain/value_objects.py
Core Entities
Meeting (entities/meeting.py)
Aggregate root with lifecycle states.
- Classes:
MeetingLoadParams,MeetingCreateParams,Meeting - States: CREATED -> RECORDING -> STOPPED -> COMPLETED (or ERROR, STOPPING)
- Key Fields: id (UUID), title, state, project_id, created_at, started_at, stopped_at
Segment (entities/segment.py)
Transcript fragment with timing and speaker.
- Key Fields: segment_id, text, start_time, end_time, speaker_id, language, confidence
- Related:
WordTimingfor word-level boundaries
Summary (entities/summary.py)
Generated summary with key points and action items.
- Key Fields: id, meeting_id, template_id, content, format, provider
- Contains:
KeyPoint[],ActionItem[]
Annotation (entities/annotation.py)
User annotation linked to segments.
- Types: ACTION_ITEM, DECISION, NOTE, RISK
- Key Fields: id, meeting_id, type, text, segment_ids, priority
NamedEntity (entities/named_entity.py)
NER extraction results.
- Categories: PERSON, COMPANY, PRODUCT, TECHNICAL, ACRONYM, LOCATION, DATE, OTHER
- Key Fields: id, name, category, segment_ids, meeting_id
Project (entities/project.py)
Workspace grouping for meetings.
- Contains:
ExportRules,TriggerRules,EffectiveRules,ProjectSettings - Key Fields: id, workspace_id, name, slug, members
- Helpers:
slugify(),SYSTEM_DEFAULTS
Integration (entities/integration.py)
External service connections.
- Types: AUTH, EMAIL, CALENDAR, PKM, CUSTOM (
IntegrationType) - Statuses: DISCONNECTED, CONNECTED, ERROR (
IntegrationStatus) - Sync Tracking:
SyncRun,SyncRunStatus
SummarizationTemplate (entities/summarization_template.py)
Configurable summary generation template.
- Key Fields: id, name, tone, format, verbosity
- Versioning:
SummarizationTemplateVersion
Task (entities/task.py)
Action items and tasks extracted or created.
- Key Fields: id, meeting_id, title, description, status, assignee_id, due_date
- Statuses:
TaskStatusenum
ProcessingStatus (entities/processing.py)
Post-meeting processing state tracking.
- Key Fields: meeting_id, steps, overall_status
- Related:
ProcessingStepState,ProcessingStepStatus
Analytics Entities (entities/analytics.py)
Dashboard and reporting data structures.
AnalyticsOverview- High-level meeting statisticsDailyMeetingStats- Per-day meeting counts and durationEntityAnalytics- NER entity statisticsEntityCategoryStat- Category breakdownsSpeakerStat- Speaker participation metricsTopEntity- Most frequent entities
Value Objects (value_objects.py)
Type-Safe IDs
MeetingId = NewType("MeetingId", UUID)AnnotationId = NewType("AnnotationId", UUID)ProjectId = NewType("ProjectId", UUID)WorkspaceId = NewType("WorkspaceId", UUID)UserId = NewType("UserId", UUID)TemplateId = NewType("TemplateId", UUID)
Enums
MeetingState(IntEnum): UNSPECIFIED=0, CREATED=1, RECORDING=2, STOPPED=3, COMPLETED=4, ERROR=5, STOPPING=6AnnotationType(Enum): ACTION_ITEM, DECISION, NOTE, RISKExportFormat(Enum): MARKDOWN, HTML, PDFPriority(Enum): LOW, MEDIUM, HIGHTaskStatus(Enum): PENDING, IN_PROGRESS, COMPLETED, CANCELLED
Error Hierarchy (errors.py)
- Base:
DomainErrorwithErrorCodeenum mapping to gRPCStatusCode - 30+ specific error types (MEETING_NOT_FOUND, WORKSPACE_ACCESS_DENIED, etc.)
Identity Entities (domain/identity/)
User: User identity with email, name, pictureWorkspace: Tenant containerWorkspaceMembership: User-workspace relationship with roleProjectRole: Role definitions (owner, editor, viewer)ProjectMembership: User-project relationship with role
Entity Exports (__init__.py)
All entities are re-exported from domain/entities/__init__.py:
from noteflow.domain.entities import (
Meeting, Segment, Summary, Annotation, NamedEntity,
Project, Integration, SummarizationTemplate, Task,
AnalyticsOverview, DailyMeetingStats, EntityAnalytics,
ProcessingStatus, ProcessingStepState, ProcessingStepStatus,
# ... and related types
)