Transaction
TRansactions with inputs and outputs
Schema
id
: UUIDtransactionTypeId
: UUIDpayload
: JSONeventId
: ID
Relations
- TransactionTypeType - ONE
- BalanceSnapshot - MANY
- Event - ONE
Prisma definition
model Transaction {
id String @map("id") @db.Uuid
transactionTypeId String @map("transaction_type_id") @db.Uuid
payload Json @map("payload") @db.JsonB
eventId String @map("event_id")
transactionType TransactionType @relation(fields: [transactionTypeId], references: [id], onUpdate: NoAction, onDelete: NoAction)
snapshots BalanceSnapshot[] @relation
event Event @relation(fields: [eventId], references: [id], onUpdate: NoAction, onDelete: NoAction)
@@id([id])
@@unique([eventId])
@@map("transactions")
}
}