feat: implement Weather Workshop feature with models, UI components, and session management for enhanced team visibility and personal well-being tracking
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m16s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m16s
This commit is contained in:
@@ -29,6 +29,11 @@ model User {
|
||||
weeklyCheckInSessions WeeklyCheckInSession[]
|
||||
sharedWeeklyCheckInSessions WCISessionShare[]
|
||||
weeklyCheckInSessionEvents WCISessionEvent[]
|
||||
// Weather Workshop relations
|
||||
weatherSessions WeatherSession[]
|
||||
sharedWeatherSessions WeatherSessionShare[]
|
||||
weatherSessionEvents WeatherSessionEvent[]
|
||||
weatherEntries WeatherEntry[]
|
||||
// Teams & OKRs relations
|
||||
createdTeams Team[]
|
||||
teamMembers TeamMember[]
|
||||
@@ -454,3 +459,69 @@ model WCISessionEvent {
|
||||
|
||||
@@index([sessionId, createdAt])
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// Weather Workshop
|
||||
// ============================================
|
||||
|
||||
model WeatherSession {
|
||||
id String @id @default(cuid())
|
||||
title String
|
||||
date DateTime @default(now())
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
entries WeatherEntry[]
|
||||
shares WeatherSessionShare[]
|
||||
events WeatherSessionEvent[]
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([userId])
|
||||
@@index([date])
|
||||
}
|
||||
|
||||
model WeatherEntry {
|
||||
id String @id @default(cuid())
|
||||
sessionId String
|
||||
session WeatherSession @relation(fields: [sessionId], references: [id], onDelete: Cascade)
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
performanceEmoji String? // Emoji météo pour Performance
|
||||
moralEmoji String? // Emoji météo pour Moral
|
||||
fluxEmoji String? // Emoji météo pour Flux
|
||||
valueCreationEmoji String? // Emoji météo pour Création de valeur
|
||||
notes String? // Notes globales
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@unique([sessionId, userId]) // Un seul entry par membre par session
|
||||
@@index([sessionId])
|
||||
@@index([userId])
|
||||
}
|
||||
|
||||
model WeatherSessionShare {
|
||||
id String @id @default(cuid())
|
||||
sessionId String
|
||||
session WeatherSession @relation(fields: [sessionId], references: [id], onDelete: Cascade)
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
role ShareRole @default(EDITOR)
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@unique([sessionId, userId])
|
||||
@@index([sessionId])
|
||||
@@index([userId])
|
||||
}
|
||||
|
||||
model WeatherSessionEvent {
|
||||
id String @id @default(cuid())
|
||||
sessionId String
|
||||
session WeatherSession @relation(fields: [sessionId], references: [id], onDelete: Cascade)
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
type String // ENTRY_CREATED, ENTRY_UPDATED, ENTRY_DELETED, SESSION_UPDATED, etc.
|
||||
payload String // JSON payload
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@index([sessionId, createdAt])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user