feat(teams): add Team model to Prisma schema

This commit is contained in:
2026-06-25 23:57:03 +02:00
parent b401f254ec
commit 8f6d2882f8
+14
View File
@@ -130,6 +130,9 @@ model Person {
email String?
phone String?
teamId String? @db.Uuid
team Team? @relation(fields: [teamId], references: [id], onDelete: SetNull, onUpdate: Cascade)
userId String? @unique @db.Uuid
user User? @relation(fields: [userId], references: [id], onDelete: SetNull, onUpdate: Cascade)
@@ -141,9 +144,20 @@ model Person {
@@index([lastName, firstName])
@@index([department, deletedAt])
@@index([teamId, deletedAt])
@@index([teamId])
@@index([deletedAt])
}
model Team {
id String @id @default(uuid(7)) @db.Uuid
name String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
people Person[]
}
// ======================================================
// CATALOG
// ======================================================