Implement expense tracking foundation for v1

This commit is contained in:
2026-03-23 12:32:36 -04:00
parent 5d7e25c015
commit 905af75cd8
39 changed files with 9923 additions and 9 deletions

View File

@@ -0,0 +1,28 @@
-- CreateTable
CREATE TABLE "Expense" (
"id" TEXT NOT NULL PRIMARY KEY,
"date" TEXT NOT NULL,
"title" TEXT NOT NULL,
"amountCents" INTEGER NOT NULL,
"category" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
);
-- CreateTable
CREATE TABLE "Paycheck" (
"id" TEXT NOT NULL PRIMARY KEY,
"payDate" TEXT NOT NULL,
"amountCents" INTEGER NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
);
-- CreateTable
CREATE TABLE "MonthlyInsight" (
"id" TEXT NOT NULL PRIMARY KEY,
"month" TEXT NOT NULL,
"year" INTEGER NOT NULL,
"generatedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"summary" TEXT NOT NULL,
"recommendations" TEXT NOT NULL,
"inputSnapshot" TEXT NOT NULL
);

View File

@@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (e.g., Git)
provider = "sqlite"

BIN
prisma/prisma/dev.db Normal file

Binary file not shown.

45
prisma/schema.prisma Normal file
View File

@@ -0,0 +1,45 @@
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
enum Category {
RENT
FOOD
TRANSPORT
BILLS
SHOPPING
HEALTH
ENTERTAINMENT
MISC
}
model Expense {
id String @id @default(cuid())
date String
title String
amountCents Int
category Category
createdAt DateTime @default(now())
}
model Paycheck {
id String @id @default(cuid())
payDate String
amountCents Int
createdAt DateTime @default(now())
}
model MonthlyInsight {
id String @id @default(cuid())
month String
year Int
generatedAt DateTime @default(now())
summary String
recommendations String
inputSnapshot String
}