first commit

This commit is contained in:
Peter Wood
2025-04-05 10:44:18 -04:00
commit 7c1cf427d1
10 changed files with 1031 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
-- CreateTable
CREATE TABLE "bank_accounts" (
"id" SERIAL NOT NULL,
"name" TEXT NOT NULL,
"bankName" TEXT NOT NULL,
"accountNumber" TEXT NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
CONSTRAINT "bank_accounts_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "bank_accounts_accountNumber_key" ON "bank_accounts"("accountNumber");

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 = "postgresql"

21
api/prisma/schema.prisma Normal file
View File

@@ -0,0 +1,21 @@
// prisma/schema.prisma
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model BankAccount {
id Int @id @default(autoincrement())
name String // e.g., "Checking Account", "Savings XYZ"
bankName String // e.g., "Chase", "Wells Fargo"
accountNumber String @unique // Consider encryption in a real app
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@map("bank_accounts") // Optional: specify table name in snake_case
}