first commit

This commit is contained in:
2026-10-03 13:40:26 +02:00
parent 732a5b5a16
commit 566f415fa7
555 changed files with 62704 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import { UserRefReadModel } from './user-ref.read-model';
/** One line of the project activity feed (one per domain event). */
export class ActivityReadModel {
/** `${aggregateId}:${aggregateVersion}` */
id!: string;
/** Event class name, e.g. `IssueStatusChangedEvent`. */
type!: string;
projectId!: string;
issueId!: string | null;
issueKey!: string | null;
actor!: UserRefReadModel;
/** Human readable sentence ("Ana moved TS-4 from IN_QA to QA_FAILED: ..."). */
summary!: string;
occurredAt!: string;
}

View File

@@ -0,0 +1,12 @@
import { UserRefReadModel } from './user-ref.read-model';
export class CommentReadModel {
id!: string;
issueId!: string;
projectId!: string;
author!: UserRefReadModel;
body!: string;
createdAt!: string;
editedAt!: string | null;
version!: number;
}

View File

@@ -0,0 +1,7 @@
export * from './user-ref.read-model';
export * from './project.read-model';
export * from './issue.read-model';
export * from './comment.read-model';
export * from './release.read-model';
export * from './activity.read-model';
export * from './project-stats.read-model';

View File

@@ -0,0 +1,45 @@
import {
IssueArea,
IssueLinkType,
IssuePriority,
IssueStatus,
IssueType,
} from '../issue/issue.enums';
import { UserRefReadModel } from './user-ref.read-model';
export type LinkDirection = 'OUTWARD' | 'INWARD';
export class IssueLinkReadModel {
type!: IssueLinkType;
/** OUTWARD: this issue → other (e.g. "blocks"). INWARD: other → this ("is blocked by"). */
direction!: LinkDirection;
issueId!: string;
issueKey!: string;
}
export class IssueReadModel {
id!: string;
projectId!: string;
projectKey!: string;
number!: number;
key!: string;
type!: IssueType;
area!: IssueArea | null;
title!: string;
description!: string | null;
status!: IssueStatus;
priority!: IssuePriority;
reporter!: UserRefReadModel;
assignee!: UserRefReadModel | null;
release!: { id: string; name: string } | null;
labels!: string[];
figmaUrl!: string | null;
storyPoints!: number | null;
dueDate!: string | null;
links!: IssueLinkReadModel[];
commentCount!: number;
createdAt!: string;
updatedAt!: string;
/** Position of the last projected event. */
version!: number;
}

View File

@@ -0,0 +1,19 @@
import { IssuePriority, IssueStatus, IssueType } from '../issue/issue.enums';
import { UserRefReadModel } from './user-ref.read-model';
export class CountBy<TKey = string> {
key!: TKey;
count!: number;
}
/** Tracking dashboard of a project. */
export class ProjectStatsReadModel {
total!: number;
open!: number;
byStatus!: CountBy<IssueStatus>[];
byType!: CountBy<IssueType>[];
byPriority!: CountBy<IssuePriority>[];
byArea!: CountBy<string>[];
/** Open tickets per person (user null = unassigned). */
byAssignee!: { user: UserRefReadModel | null; count: number }[];
}

View File

@@ -0,0 +1,20 @@
import { ProjectRole } from '../project/project-role';
import { UserRefReadModel } from './user-ref.read-model';
export class ProjectMemberReadModel {
user!: UserRefReadModel;
role!: ProjectRole;
}
export class ProjectReadModel {
id!: string;
key!: string;
name!: string;
description!: string | null;
owner!: UserRefReadModel;
members!: ProjectMemberReadModel[];
createdAt!: string;
updatedAt!: string;
/** Position of the last projected event. */
version!: number;
}

View File

@@ -0,0 +1,21 @@
import { IssueStatus } from '../issue/issue.enums';
import { ReleaseStatus } from '../release/release-status';
export class ReleaseReadModel {
id!: string;
projectId!: string;
name!: string;
description!: string | null;
targetDate!: string | null;
status!: ReleaseStatus;
releasedAt!: string | null;
createdAt!: string;
version!: number;
}
export class ReleaseProgressReadModel {
total!: number;
finished!: number;
percent!: number;
byStatus!: { key: IssueStatus; count: number }[];
}

View File

@@ -0,0 +1,5 @@
/** Denormalised user reference (name resolved from the identity context). */
export class UserRefReadModel {
id!: string;
name!: string;
}