feat(backend): Koeniginnenbewertung (Modul 31)
QueenEvaluation-Modell (Volksstaerke, Sanftmut, Wabensitz, Schwarm- trieb, Brutbild, Honigertrag je Skala 1-5) als Sub-Ressource der Queens-API: GET/POST /queens/:id/evaluations. Vorgezogen vor Modul 27 (Statistik), da dessen Koeniginnen-Auswertungen auf diesen Daten aufbauen.
This commit is contained in:
1 parent
0fc13952fb
commit
50268fa591
8 files changed
+245
-1
No files matched your search
@@ -51,6 +51,7 @@ model User {
|
||||
auditLogs AuditLog[]
|
||||
bottlingBatches BottlingBatch[]
|
||||
notifications Notification[]
|
||||
queenEvaluations QueenEvaluation[]
|
||||
|
||||
@@index([role])
|
||||
}
|
||||
@@ -172,6 +173,7 @@ model Colony {
|
||||
treatments Treatment[]
|
||||
feedings Feeding[]
|
||||
harvests HarvestColony[]
|
||||
queenEvaluations QueenEvaluation[]
|
||||
|
||||
@@index([apiaryId])
|
||||
@@index([status])
|
||||
@@ -252,10 +254,37 @@ model Queen {
|
||||
|
||||
colony Colony? @relation("ColonyCurrentQueen")
|
||||
colonyHistory QueenColonyHistory[]
|
||||
evaluations QueenEvaluation[]
|
||||
|
||||
@@index([status])
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Königinnenbewertung (Abschnitt 4.7) – v1.x Modul 31
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
model QueenEvaluation {
|
||||
id String @id @default(cuid())
|
||||
queenId String
|
||||
queen Queen @relation(fields: [queenId], references: [id])
|
||||
colonyId String?
|
||||
colony Colony? @relation(fields: [colonyId], references: [id])
|
||||
date DateTime
|
||||
colonyStrength Int
|
||||
gentleness Int
|
||||
combBuild Int
|
||||
swarmingTendency Int
|
||||
broodPattern Int
|
||||
honeyYield Int
|
||||
notes String?
|
||||
userId String?
|
||||
user User? @relation(fields: [userId], references: [id])
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@index([queenId])
|
||||
@@index([colonyId])
|
||||
}
|
||||
|
||||
// Königinnenwechsel historisch nachvollziehbar (Abschnitt 4.5)
|
||||
model QueenColonyHistory {
|
||||
id String @id @default(cuid())
|
||||
|
||||
Reference in new issue
Block a user