mirror of
https://github.com/marcogll/TaxHacker_s23.git
synced 2026-01-14 13:01:19 +00:00
feat: invoice generator
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "users" ADD COLUMN "business_address" TEXT,
|
||||
ADD COLUMN "business_bank_details" TEXT,
|
||||
ADD COLUMN "business_logo" TEXT,
|
||||
ADD COLUMN "business_name" TEXT;
|
||||
15
prisma/migrations/20250507100532_add_app_data/migration.sql
Normal file
15
prisma/migrations/20250507100532_add_app_data/migration.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "app_data" (
|
||||
"id" UUID NOT NULL,
|
||||
"app" TEXT NOT NULL,
|
||||
"user_id" UUID NOT NULL,
|
||||
"data" JSONB NOT NULL,
|
||||
|
||||
CONSTRAINT "app_data_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "app_data_user_id_app_key" ON "app_data"("user_id", "app");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "app_data" ADD CONSTRAINT "app_data_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
@@ -32,8 +32,13 @@ model User {
|
||||
storageUsed Int @default(0) @map("storage_used")
|
||||
storageLimit Int @default(-1) @map("storage_limit")
|
||||
aiBalance Int @default(0) @map("ai_balance")
|
||||
businessName String? @map("business_name")
|
||||
businessAddress String? @map("business_address")
|
||||
businessBankDetails String? @map("business_bank_details")
|
||||
businessLogo String? @map("business_logo")
|
||||
accounts Account[]
|
||||
sessions Session[]
|
||||
appData AppData[]
|
||||
|
||||
@@map("users")
|
||||
}
|
||||
@@ -203,3 +208,14 @@ model Currency {
|
||||
@@unique([userId, code])
|
||||
@@map("currencies")
|
||||
}
|
||||
|
||||
model AppData {
|
||||
id String @id @default(uuid()) @db.Uuid
|
||||
app String
|
||||
userId String @map("user_id") @db.Uuid
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
data Json
|
||||
|
||||
@@unique([userId, app])
|
||||
@@map("app_data")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user