feat(teams): add team service and use-cases with integration tests

This commit is contained in:
2026-06-26 00:03:01 +02:00
parent f88d831f4c
commit 5d303bdb7e
7 changed files with 375 additions and 0 deletions
+13
View File
@@ -77,6 +77,19 @@ export async function createTestPerson(
})
}
export async function createTestTeam(
prisma: PrismaClient,
overrides: Partial<{ name: string }> = {},
) {
const suffix = nextSuffix()
return prisma.team.create({
data: {
name: overrides.name ?? `Test Team ${suffix}`,
},
})
}
export async function createTestItem(
prisma: PrismaClient,
overrides: Partial<{
+1
View File
@@ -18,6 +18,7 @@ const TABLES_TO_TRUNCATE = [
"Asset",
"Item",
"Category",
"Team",
"Person",
"User",
]