Migrate billing backend from Django to Express + Apollo Server + Prisma
All checks were successful
Build Docker Image / build (push) Successful in 1m44s

Replace Python/Django/Graphene with TypeScript/Express/Apollo Server.
Same 2 endpoints (team/m2m), same JWT auth, same TigerBeetle integration.
Prisma ORM replaces Django ORM for Account/OperationCode/ServiceAccount.
This commit is contained in:
Ruslan Bakiev
2026-03-09 09:13:07 +07:00
parent 5ce3acf8b0
commit 2d96afabec
49 changed files with 4356 additions and 2968 deletions

43
prisma/schema.prisma Normal file
View File

@@ -0,0 +1,43 @@
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("BILLING_DATABASE_URL")
}
enum AccountType {
USER
SERVICE
}
model Account {
uuid String @id @default(uuid()) @db.Uuid
name String @db.VarChar(255)
accountType AccountType @default(USER) @map("account_type")
description String?
createdAt DateTime @default(now()) @map("created_at")
serviceInfo ServiceAccount?
@@map("billing_app_account")
}
model OperationCode {
id Int @id @default(autoincrement())
code Int @unique
name String @unique @db.VarChar(255)
description String?
createdAt DateTime @default(now()) @map("created_at")
@@map("billing_app_operationcode")
}
model ServiceAccount {
accountUuid String @id @map("account_id") @db.Uuid
slug String @unique @db.VarChar(50)
account Account @relation(fields: [accountUuid], references: [uuid], onDelete: Cascade)
@@map("billing_app_serviceaccount")
}