2024-04-26 12:07:11 +02:00
|
|
|
import type {
|
|
|
|
IProjectOwnersReadModel,
|
2024-10-01 10:18:42 +02:00
|
|
|
ProjectOwners,
|
2024-09-30 10:49:34 +02:00
|
|
|
UserProjectOwner,
|
2024-09-25 13:32:33 +02:00
|
|
|
WithProjectOwners,
|
2024-04-26 12:07:11 +02:00
|
|
|
} from './project-owners-read-model.type';
|
|
|
|
|
|
|
|
export class FakeProjectOwnersReadModel implements IProjectOwnersReadModel {
|
2024-09-25 13:32:33 +02:00
|
|
|
async addOwners<T extends { id: string }>(
|
|
|
|
projects: T[],
|
|
|
|
): Promise<WithProjectOwners<T>> {
|
2024-04-26 12:07:11 +02:00
|
|
|
return projects.map((project) => ({
|
|
|
|
...project,
|
|
|
|
owners: [{ ownerType: 'system' }],
|
|
|
|
}));
|
|
|
|
}
|
2024-09-30 10:49:34 +02:00
|
|
|
|
|
|
|
async getAllUserProjectOwners(): Promise<UserProjectOwner[]> {
|
|
|
|
return [];
|
|
|
|
}
|
2024-10-01 10:18:42 +02:00
|
|
|
|
|
|
|
async getProjectOwners(): Promise<ProjectOwners> {
|
|
|
|
return [];
|
|
|
|
}
|
2024-04-26 12:07:11 +02:00
|
|
|
}
|