36 lines
937 B
Plaintext
36 lines
937 B
Plaintext
// This is your Prisma schema file,
|
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
/// The Main Ledger stores immutable financial or event entries.
|
|
model MainLedger {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
reference String @db.VarChar(128)
|
|
amount Decimal @db.Decimal(18, 6)
|
|
currency String @db.VarChar(16)
|
|
description String?
|
|
metadata Json?
|
|
|
|
@@index([reference])
|
|
}
|
|
|
|
/// The Registry holds key→value configuration and descriptors.
|
|
model Registry {
|
|
id Int @id @default(autoincrement())
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
key String @unique @db.VarChar(128)
|
|
value Json
|
|
description String?
|
|
}
|