43 lines
997 B
Plaintext
43 lines
997 B
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
}
|
|
|
|
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")
|
|
}
|