addition expense claims
This commit is contained in:
@@ -200,6 +200,7 @@ model Employee {
|
||||
commissions Commission[]
|
||||
loans Loan[]
|
||||
purchaseRequests PurchaseRequest[]
|
||||
expenseClaims ExpenseClaim[]
|
||||
leaveEntitlements LeaveEntitlement[]
|
||||
employeeContracts EmployeeContract[]
|
||||
tenderDirectivesAssigned TenderDirective[]
|
||||
@@ -503,6 +504,34 @@ model PurchaseRequest {
|
||||
@@map("purchase_requests")
|
||||
}
|
||||
|
||||
model ExpenseClaim {
|
||||
id String @id @default(uuid())
|
||||
employeeId String
|
||||
employee Employee @relation(fields: [employeeId], references: [id])
|
||||
|
||||
claimNumber String @unique
|
||||
|
||||
items Json?
|
||||
totalAmount Decimal? @db.Decimal(12, 2)
|
||||
|
||||
expenseDate DateTime? @db.Date
|
||||
amount Decimal? @db.Decimal(12, 2)
|
||||
description String?
|
||||
projectOrTender String?
|
||||
|
||||
status String @default("PENDING")
|
||||
approvedBy String?
|
||||
approvedAt DateTime?
|
||||
rejectedReason String?
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([employeeId])
|
||||
@@index([status])
|
||||
@@map("expense_claims")
|
||||
}
|
||||
|
||||
model LeaveEntitlement {
|
||||
id String @id @default(uuid())
|
||||
employeeId String
|
||||
|
||||
Reference in New Issue
Block a user