api: create reminders

Pedro Lucas Porcellis porcellis@eletrotupi.com 1 month ago b4d55cb6c0798e104724a081ee5745a111ff3b6e
Parents: ad630cb
2 file(s) changed
  • api/prisma/migrations/20260504224941_create_reminders/migration.sql +10 -0
  • api/prisma/schema.prisma +10 -0
api/prisma/migrations/20260504224941_create_reminders/migration.sql
@@ -0,0 +1,10 @@
1 + -- CreateTable
2 + CREATE TABLE "reminders" (
3 + "id" SERIAL NOT NULL,
4 + "hour" INTEGER NOT NULL,
5 + "minute" INTEGER NOT NULL,
6 + "description" TEXT,
7 + "active" BOOLEAN NOT NULL DEFAULT false,
8 +
9 + CONSTRAINT "reminders_pkey" PRIMARY KEY ("id")
10 + );
api/prisma/schema.prisma
@@ -76,6 +76,16 @@
76 76 @@map("triggers")
77 77 }
78 78
79 + model Reminder {
80 + id Int @id @default(autoincrement())
81 + hour Int
82 + minute Int
83 + description String?
84 + active Boolean @default(false)
85 +
86 + @@map("reminders")
87 + }
88 +
79 89 enum IntensityLevel {
80 90 LIGHT
81 91 MODERATE