v0.5.1 — Reminders, plant groups, location views, Wikipedia photos, Docker deploy
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -71,6 +71,18 @@ enum PlantCategory {
|
||||
OTHER
|
||||
}
|
||||
|
||||
model PlantGroup {
|
||||
id String @id @default(cuid())
|
||||
name String @unique
|
||||
notes String?
|
||||
active Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
plants Plant[]
|
||||
|
||||
@@index([active])
|
||||
}
|
||||
|
||||
model Plant {
|
||||
id String @id @default(cuid())
|
||||
commonName String
|
||||
@@ -81,14 +93,19 @@ model Plant {
|
||||
plantedAt DateTime? // when it went in the ground
|
||||
source String? // where it came from ("Jung's Nursery", "from seed", "division from Mom's")
|
||||
notes String? // general notes about this plant
|
||||
groupId String? // optional: belongs to a PlantGroup (e.g. "Irises")
|
||||
group PlantGroup? @relation(fields: [groupId], references: [id])
|
||||
imageUrl String? // thumbnail fetched from Wikipedia on add/edit
|
||||
active Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
logs PlantLog[]
|
||||
tasks Task[]
|
||||
|
||||
@@index([category])
|
||||
@@index([zone])
|
||||
@@index([active])
|
||||
@@index([groupId])
|
||||
}
|
||||
|
||||
enum PlantLogType {
|
||||
@@ -100,6 +117,57 @@ enum PlantLogType {
|
||||
DIED // plant died or was removed
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Tasks / reminders
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
enum TaskCategory {
|
||||
GARDEN
|
||||
HOME
|
||||
EQUIPMENT
|
||||
OTHER
|
||||
}
|
||||
|
||||
enum RecurrenceType {
|
||||
ONCE // one-time task, no repeat
|
||||
CUSTOM // every N days (intervalDays)
|
||||
MONTHLY // same day every month (uses nextDue day-of-month)
|
||||
YEARLY // same month every year (month field)
|
||||
}
|
||||
|
||||
model Task {
|
||||
id String @id @default(cuid())
|
||||
title String
|
||||
notes String?
|
||||
category TaskCategory @default(GARDEN)
|
||||
plantId String?
|
||||
plant Plant? @relation(fields: [plantId], references: [id])
|
||||
recurrence RecurrenceType @default(YEARLY)
|
||||
intervalDays Int? // for CUSTOM: every N days
|
||||
month Int? // 1–12: for YEARLY, which month
|
||||
nextDue DateTime
|
||||
lastDone DateTime?
|
||||
active Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
completions TaskCompletion[]
|
||||
|
||||
@@index([nextDue])
|
||||
@@index([plantId])
|
||||
@@index([active])
|
||||
}
|
||||
|
||||
model TaskCompletion {
|
||||
id String @id @default(cuid())
|
||||
taskId String
|
||||
task Task @relation(fields: [taskId], references: [id])
|
||||
doneAt DateTime @default(now())
|
||||
notes String?
|
||||
actorId String?
|
||||
|
||||
@@index([taskId])
|
||||
}
|
||||
|
||||
model PlantLog {
|
||||
id String @id @default(cuid())
|
||||
plantId String
|
||||
|
||||
Reference in New Issue
Block a user