update 4 payment
This commit is contained in:
@@ -138,9 +138,10 @@ model ServiceLine {
|
|||||||
billedAmount Float
|
billedAmount Float
|
||||||
totalPaid Decimal @default(0.00) @db.Decimal(10, 2)
|
totalPaid Decimal @default(0.00) @db.Decimal(10, 2)
|
||||||
totalAdjusted Decimal @default(0.00) @db.Decimal(10, 2)
|
totalAdjusted Decimal @default(0.00) @db.Decimal(10, 2)
|
||||||
|
totalDue Decimal @default(0.00) @db.Decimal(10, 2)
|
||||||
status ServiceLineStatus @default(UNPAID)
|
status ServiceLineStatus @default(UNPAID)
|
||||||
|
|
||||||
claim Claim @relation(fields: [claimId], references: [id], onDelete: Cascade)
|
claim Claim @relation(fields: [claimId], references: [id], onDelete: Cascade)
|
||||||
serviceLineTransactions ServiceLineTransaction[]
|
serviceLineTransactions ServiceLineTransaction[]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,22 +199,22 @@ enum PdfCategory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
model Payment {
|
model Payment {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
claimId Int @unique
|
claimId Int @unique
|
||||||
patientId Int
|
patientId Int
|
||||||
userId Int
|
userId Int
|
||||||
updatedById Int?
|
updatedById Int?
|
||||||
totalBilled Decimal @db.Decimal(10, 2)
|
totalBilled Decimal @db.Decimal(10, 2)
|
||||||
totalPaid Decimal @default(0.00) @db.Decimal(10, 2)
|
totalPaid Decimal @default(0.00) @db.Decimal(10, 2)
|
||||||
totalDue Decimal @db.Decimal(10, 2)
|
totalDue Decimal @db.Decimal(10, 2)
|
||||||
status PaymentStatus @default(PENDING)
|
status PaymentStatus @default(PENDING)
|
||||||
notes String?
|
notes String?
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt
|
updatedAt DateTime @updatedAt
|
||||||
|
|
||||||
claim Claim @relation(fields: [claimId], references: [id], onDelete: Cascade)
|
claim Claim @relation(fields: [claimId], references: [id], onDelete: Cascade)
|
||||||
patient Patient @relation(fields: [patientId], references: [id], onDelete: Cascade)
|
patient Patient @relation(fields: [patientId], references: [id], onDelete: Cascade)
|
||||||
updatedBy User? @relation("PaymentUpdatedBy", fields: [updatedById], references: [id])
|
updatedBy User? @relation("PaymentUpdatedBy", fields: [updatedById], references: [id])
|
||||||
transactions ServiceLineTransaction[]
|
transactions ServiceLineTransaction[]
|
||||||
|
|
||||||
@@index([id])
|
@@index([id])
|
||||||
|
|||||||
Reference in New Issue
Block a user