feat: add time entry manager, controller, and API routes
This commit is contained in:
+376
-110
@@ -666,6 +666,7 @@ model Member {
|
||||
approvedOpportunities Opportunity[] @relation("OpportunityApprovedBy")
|
||||
rejectedOpportunities Opportunity[] @relation("OpportunityRejectedBy")
|
||||
opportunityMembers OpportunityMember[] @relation("OpportunityMemberToMember")
|
||||
memberType MemberType? @relation(fields: [memberTypeRecId], references: [memberTypeRecId], onDelete: NoAction, onUpdate: NoAction)
|
||||
|
||||
@@map("Member")
|
||||
@@schema("dbo")
|
||||
@@ -1740,10 +1741,13 @@ model ActivityType {
|
||||
description String @map("Description") @db.NVarChar(50)
|
||||
hoursMin Decimal? @map("Hours_Min") @db.Decimal(18, 2)
|
||||
hoursMax Decimal? @map("Hours_Max") @db.Decimal(18, 2)
|
||||
defaultFlag Boolean @map("Default_Flag")
|
||||
multiplierFlag Boolean @map("Multiplier_Flag")
|
||||
rate Decimal? @map("Rate") @db.Decimal(18, 2)
|
||||
rateType String? @map("Rate_Type") @db.Char(1)
|
||||
|
||||
defaultFlag Boolean @map("Default_Flag")
|
||||
multiplierFlag Boolean @map("Multiplier_Flag")
|
||||
|
||||
rate Decimal? @map("Rate") @db.Decimal(18, 2)
|
||||
rateType String? @map("Rate_Type") @db.Char(1)
|
||||
|
||||
inactiveFlag Boolean @map("Inactive_Flag")
|
||||
invoiceFlag Boolean @map("Invoice_Flag")
|
||||
lastUpdate DateTime @map("Last_Update") @db.DateTime2
|
||||
@@ -2069,45 +2073,63 @@ model Country {
|
||||
// =====================
|
||||
|
||||
model SoActivity {
|
||||
soActivityRecId Int @id @map("SO_Activity_Recid")
|
||||
opportunityRecId Int? @map("Opportunity_Recid")
|
||||
assignTo String @map("Assign_To") @db.NVarChar(15)
|
||||
assignedBy String @map("Assigned_By") @db.NVarChar(15)
|
||||
companyRecId Int? @map("Company_RecID")
|
||||
soActivityTypeRecId Int? @map("SO_Activity_Type_RecID")
|
||||
subject String? @map("Subject") @db.NVarChar(100)
|
||||
soReferenceRecId Int? @map("SO_Reference_RecID")
|
||||
dateEntered DateTime @map("Date_Entered") @db.DateTime
|
||||
enteredBy String @map("Entered_By") @db.NVarChar(15)
|
||||
contactRecId Int? @map("Contact_RecID")
|
||||
contactName String? @map("Contact_Name") @db.NVarChar(62)
|
||||
closeFlag Boolean @map("Close_Flag")
|
||||
dateClosed DateTime? @map("Date_Closed") @db.DateTime
|
||||
closedBy String? @map("Closed_By") @db.NVarChar(15)
|
||||
updatedBy String? @map("Updated_By") @db.NVarChar(15)
|
||||
lastUpdate DateTime @map("Last_Update") @db.DateTime
|
||||
notifyCompleteFlag Boolean @map("Notify_Complete_Flag")
|
||||
notificationSentFlag Boolean @map("Notification_Sent_Flag")
|
||||
srServiceRecId Int? @map("SR_Service_RecID")
|
||||
agrHeaderRecId Int? @map("AGR_Header_RecID")
|
||||
marketingCampaignRecId Int? @map("Marketing_Campaign_RecID")
|
||||
assignToRecId Int @map("assignto_recid")
|
||||
assignByRecId Int? @map("assignby_recid")
|
||||
mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier
|
||||
srLocationRecId Int? @map("SR_Location_RecID")
|
||||
dateTimeStart DateTime? @map("Date_Time_Start") @db.DateTime
|
||||
dateTimeEnd DateTime? @map("Date_Time_End") @db.DateTime
|
||||
automated Boolean @map("Automated")
|
||||
dateTimeStartUtc DateTime? @map("Date_Time_Start_UTC") @db.SmallDateTime
|
||||
dateTimeEndUtc DateTime? @map("Date_Time_End_UTC") @db.SmallDateTime
|
||||
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime
|
||||
lastUpdatedUTC DateTime @map("Last_Update_UTC") @db.DateTime
|
||||
dateClosedUtc DateTime? @map("Date_Closed_UTC") @db.DateTime
|
||||
soActStatusRecId Int @map("so_act_status_recid")
|
||||
currencyRecId Int @map("Currency_RecID")
|
||||
id String? @map("Id") @db.UniqueIdentifier
|
||||
subject String? @map("Subject") @db.NVarChar(100)
|
||||
|
||||
opportunity Opportunity? @relation(fields: [opportunityRecId], references: [opportunityRecId], onDelete: NoAction, onUpdate: NoAction)
|
||||
soActivityRecId Int @id @map("SO_Activity_Recid")
|
||||
opportunityRecId Int? @map("Opportunity_Recid")
|
||||
companyRecId Int? @map("Company_RecID")
|
||||
|
||||
assignTo String @map("Assign_To") @db.NVarChar(15)
|
||||
assignedBy String @map("Assigned_By") @db.NVarChar(15)
|
||||
|
||||
soActivityTypeRecId Int? @map("SO_Activity_Type_RecID")
|
||||
soReferenceRecId Int? @map("SO_Reference_RecID")
|
||||
|
||||
dateEntered DateTime @map("Date_Entered") @db.DateTime
|
||||
enteredBy String @map("Entered_By") @db.NVarChar(15)
|
||||
|
||||
contactRecId Int? @map("Contact_RecID")
|
||||
contactName String? @map("Contact_Name") @db.NVarChar(62)
|
||||
|
||||
closeFlag Boolean @map("Close_Flag")
|
||||
dateClosed DateTime? @map("Date_Closed") @db.DateTime
|
||||
closedBy String? @map("Closed_By") @db.NVarChar(15)
|
||||
|
||||
updatedBy String? @map("Updated_By") @db.NVarChar(15)
|
||||
lastUpdate DateTime @map("Last_Update") @db.DateTime
|
||||
|
||||
notifyCompleteFlag Boolean @map("Notify_Complete_Flag")
|
||||
notificationSentFlag Boolean @map("Notification_Sent_Flag")
|
||||
|
||||
srServiceRecId Int? @map("SR_Service_RecID")
|
||||
|
||||
agrHeaderRecId Int? @map("AGR_Header_RecID")
|
||||
marketingCampaignRecId Int? @map("Marketing_Campaign_RecID")
|
||||
|
||||
assignToRecId Int @map("assignto_recid")
|
||||
assignByRecId Int? @map("assignby_recid")
|
||||
|
||||
mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier
|
||||
srLocationRecId Int? @map("SR_Location_RecID")
|
||||
|
||||
dateTimeStart DateTime? @map("Date_Time_Start") @db.DateTime
|
||||
dateTimeEnd DateTime? @map("Date_Time_End") @db.DateTime
|
||||
|
||||
automated Boolean @map("Automated")
|
||||
|
||||
dateTimeStartUtc DateTime? @map("Date_Time_Start_UTC") @db.SmallDateTime
|
||||
dateTimeEndUtc DateTime? @map("Date_Time_End_UTC") @db.SmallDateTime
|
||||
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime
|
||||
lastUpdatedUTC DateTime @map("Last_Update_UTC") @db.DateTime
|
||||
dateClosedUtc DateTime? @map("Date_Closed_UTC") @db.DateTime
|
||||
|
||||
soActStatusRecId Int @map("so_act_status_recid")
|
||||
currencyRecId Int @map("Currency_RecID")
|
||||
|
||||
id String? @map("Id") @db.UniqueIdentifier
|
||||
|
||||
opportunity Opportunity? @relation(fields: [opportunityRecId], references: [opportunityRecId], onDelete: NoAction, onUpdate: NoAction)
|
||||
notes SoActivityNotes?
|
||||
|
||||
@@map("SO_Activity")
|
||||
@@schema("dbo")
|
||||
@@ -2284,83 +2306,84 @@ model ScheduleStatus {
|
||||
}
|
||||
|
||||
model ScheduleType {
|
||||
scheduleTypeRecId Int @id @map("Schedule_Type_RecID")
|
||||
tableReference String? @map("Table_Reference") @db.NVarChar(50)
|
||||
description String? @map("Description") @db.NVarChar(50)
|
||||
displayColor String? @map("Display_Color") @db.NVarChar(30)
|
||||
moduleId String? @map("Module_ID") @db.Char(2)
|
||||
systemFlag Boolean @map("System_Flag")
|
||||
lastUpdate DateTime @map("Last_Update") @db.DateTime2
|
||||
updatedBy String? @map("Updated_By") @db.NVarChar(15)
|
||||
displayFlag Boolean @map("Display_Flag")
|
||||
xrefMbrTable String? @map("Xref_Mbr_Table") @db.NVarChar(50)
|
||||
scheduleTypeId String? @map("Schedule_Type_ID") @db.Char(1)
|
||||
teChargeCodeRecId Int? @map("TE_Charge_Code_RecID")
|
||||
srLocationRecId Int? @map("SR_Location_RecID")
|
||||
lastUpdateUtc DateTime @map("Last_Update_UTC") @db.DateTime2
|
||||
enteredBy String @map("Entered_By") @db.NVarChar(15)
|
||||
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
|
||||
id String @map("Id") @db.UniqueIdentifier
|
||||
scheduleTypeRecId Int @id @map("Schedule_Type_RecID")
|
||||
tableReference String? @map("Table_Reference") @db.NVarChar(50)
|
||||
description String? @map("Description") @db.NVarChar(50)
|
||||
displayColor String? @map("Display_Color") @db.NVarChar(30)
|
||||
moduleId String? @map("Module_ID") @db.Char(2)
|
||||
systemFlag Boolean @map("System_Flag")
|
||||
lastUpdate DateTime @map("Last_Update") @db.DateTime2
|
||||
updatedBy String? @map("Updated_By") @db.NVarChar(15)
|
||||
displayFlag Boolean @map("Display_Flag")
|
||||
xrefMbrTable String? @map("Xref_Mbr_Table") @db.NVarChar(50)
|
||||
scheduleTypeId String? @map("Schedule_Type_ID") @db.Char(1)
|
||||
teChargeCodeRecId Int? @map("TE_Charge_Code_RecID")
|
||||
srLocationRecId Int? @map("SR_Location_RecID")
|
||||
lastUpdateUtc DateTime @map("Last_Update_UTC") @db.DateTime2
|
||||
enteredBy String @map("Entered_By") @db.NVarChar(15)
|
||||
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
|
||||
id String @map("Id") @db.UniqueIdentifier
|
||||
|
||||
schedules Schedule[]
|
||||
schedules Schedule[]
|
||||
teChargeCode TeChargeCode? @relation(fields: [teChargeCodeRecId], references: [teChargeCodeRecId], onDelete: NoAction, onUpdate: NoAction)
|
||||
|
||||
@@map("Schedule_Type")
|
||||
@@schema("dbo")
|
||||
}
|
||||
|
||||
model Schedule {
|
||||
scheduleRecId Int @id @map("Schedule_RecID")
|
||||
recId Int? @map("RecID")
|
||||
scheduleTypeRecId Int @map("Schedule_Type_RecID")
|
||||
memberId String? @map("Member_ID") @db.NVarChar(15)
|
||||
dateTimeStart DateTime? @map("Date_Time_Start") @db.DateTime
|
||||
dateTimeEnd DateTime? @map("Date_Time_End") @db.DateTime
|
||||
closeFlag Boolean @map("close_flag")
|
||||
hoursEstimated Decimal? @map("Hours_Estimated") @db.Decimal(18, 2)
|
||||
lastUpdate DateTime? @map("Last_Update") @db.DateTime
|
||||
updatedBy String? @map("Updated_By") @db.NVarChar(15)
|
||||
syncable Boolean @map("Syncable")
|
||||
lastSync DateTime? @map("Last_Sync") @db.DateTime
|
||||
exchangeGuid String? @map("Exchange_GUID") @db.VarChar(4000)
|
||||
reminderFlag Boolean @map("Reminder_Flag")
|
||||
reminderMinutes Int? @map("Reminder_Minutes")
|
||||
allDayFlag Boolean @map("All_Day_Flag")
|
||||
duration Int? @map("Duration")
|
||||
enteredByRecId Int? @map("Entered_By_RecID")
|
||||
xrefMbrRecId Int? @map("Xref_Mbr_RecID")
|
||||
percentSched Int? @map("Percent_Sched")
|
||||
hoursSched Decimal? @map("Hours_Sched") @db.Decimal(18, 2)
|
||||
scheduleStatusRecId Int? @map("Schedule_Status_RecID")
|
||||
hoursPerDay Decimal? @map("Hours_Per_Day") @db.Decimal(18, 2)
|
||||
ackFlag Boolean? @map("Ack_Flag")
|
||||
ackMemberRecId Int? @map("Ack_Member_RecID")
|
||||
ackDate DateTime? @map("Ack_Date") @db.DateTime
|
||||
closeMemberRecId Int? @map("Close_Member_RecID")
|
||||
closeDate DateTime? @map("Close_Date") @db.DateTime
|
||||
billableFlag Boolean? @map("Billable_Flag")
|
||||
dateEntered DateTime? @map("Date_Entered") @db.DateTime
|
||||
mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier
|
||||
srLocationRecId Int? @map("SR_Location_RecID")
|
||||
scheduleSpanRecId Int? @map("Schedule_Span_RecID")
|
||||
meetingFlag Boolean? @map("Meeting_Flag")
|
||||
recurringFlag Boolean? @map("Recurring_Flag")
|
||||
ackDateUtc DateTime? @map("Ack_Date_UTC") @db.DateTime
|
||||
dateEnteredUtc DateTime? @map("Date_Entered_UTC") @db.DateTime
|
||||
lastUpdateUtc DateTime? @map("Last_Update_UTC") @db.DateTime
|
||||
closeDateUtc DateTime? @map("Close_Date_UTC") @db.DateTime
|
||||
enteredBy String? @map("Entered_By") @db.NVarChar(15)
|
||||
acknowledgedBy String? @map("Acknowledged_By") @db.NVarChar(15)
|
||||
closedBy String? @map("Closed_By") @db.NVarChar(15)
|
||||
dateTimeStartUtc DateTime? @map("Date_Time_Start_UTC") @db.SmallDateTime
|
||||
dateTimeEndUtc DateTime? @map("Date_Time_End_UTC") @db.SmallDateTime
|
||||
scheduleDesc String? @map("Schedule_Desc") @db.NVarChar(250)
|
||||
privateFlag Boolean @map("Private_Flag")
|
||||
notifyType String? @map("NotifyType") @db.NVarChar(2)
|
||||
scheduleRecId Int @id @map("Schedule_RecID")
|
||||
recId Int? @map("RecID")
|
||||
scheduleTypeRecId Int @map("Schedule_Type_RecID")
|
||||
memberId String? @map("Member_ID") @db.NVarChar(15)
|
||||
dateTimeStart DateTime? @map("Date_Time_Start") @db.DateTime
|
||||
dateTimeEnd DateTime? @map("Date_Time_End") @db.DateTime
|
||||
closeFlag Boolean @map("close_flag")
|
||||
hoursEstimated Decimal? @map("Hours_Estimated") @db.Decimal(18, 2)
|
||||
lastUpdate DateTime? @map("Last_Update") @db.DateTime
|
||||
updatedBy String? @map("Updated_By") @db.NVarChar(15)
|
||||
syncable Boolean @map("Syncable")
|
||||
lastSync DateTime? @map("Last_Sync") @db.DateTime
|
||||
exchangeGuid String? @map("Exchange_GUID") @db.VarChar(4000)
|
||||
reminderFlag Boolean @map("Reminder_Flag")
|
||||
reminderMinutes Int? @map("Reminder_Minutes")
|
||||
allDayFlag Boolean @map("All_Day_Flag")
|
||||
duration Int? @map("Duration")
|
||||
enteredByRecId Int? @map("Entered_By_RecID")
|
||||
xrefMbrRecId Int? @map("Xref_Mbr_RecID")
|
||||
percentSched Int? @map("Percent_Sched")
|
||||
hoursSched Decimal? @map("Hours_Sched") @db.Decimal(18, 2)
|
||||
scheduleStatusRecId Int? @map("Schedule_Status_RecID")
|
||||
hoursPerDay Decimal? @map("Hours_Per_Day") @db.Decimal(18, 2)
|
||||
ackFlag Boolean? @map("Ack_Flag")
|
||||
ackMemberRecId Int? @map("Ack_Member_RecID")
|
||||
ackDate DateTime? @map("Ack_Date") @db.DateTime
|
||||
closeMemberRecId Int? @map("Close_Member_RecID")
|
||||
closeDate DateTime? @map("Close_Date") @db.DateTime
|
||||
billableFlag Boolean? @map("Billable_Flag")
|
||||
dateEntered DateTime? @map("Date_Entered") @db.DateTime
|
||||
mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier
|
||||
srLocationRecId Int? @map("SR_Location_RecID")
|
||||
scheduleSpanRecId Int? @map("Schedule_Span_RecID")
|
||||
meetingFlag Boolean? @map("Meeting_Flag")
|
||||
recurringFlag Boolean? @map("Recurring_Flag")
|
||||
ackDateUtc DateTime? @map("Ack_Date_UTC") @db.DateTime
|
||||
dateEnteredUtc DateTime? @map("Date_Entered_UTC") @db.DateTime
|
||||
lastUpdateUtc DateTime? @map("Last_Update_UTC") @db.DateTime
|
||||
closeDateUtc DateTime? @map("Close_Date_UTC") @db.DateTime
|
||||
enteredBy String? @map("Entered_By") @db.NVarChar(15)
|
||||
acknowledgedBy String? @map("Acknowledged_By") @db.NVarChar(15)
|
||||
closedBy String? @map("Closed_By") @db.NVarChar(15)
|
||||
dateTimeStartUtc DateTime? @map("Date_Time_Start_UTC") @db.SmallDateTime
|
||||
dateTimeEndUtc DateTime? @map("Date_Time_End_UTC") @db.SmallDateTime
|
||||
scheduleDesc String? @map("Schedule_Desc") @db.NVarChar(250)
|
||||
privateFlag Boolean @map("Private_Flag")
|
||||
notifyType String? @map("NotifyType") @db.NVarChar(2)
|
||||
|
||||
details ScheduleDetail[]
|
||||
status ScheduleStatus? @relation(fields: [scheduleStatusRecId], references: [scheduleStatusRecId], onDelete: NoAction, onUpdate: NoAction)
|
||||
type ScheduleType @relation(fields: [scheduleTypeRecId], references: [scheduleTypeRecId], onDelete: NoAction, onUpdate: NoAction)
|
||||
span ScheduleSpan? @relation(fields: [scheduleSpanRecId], references: [scheduleSpanRecId], onDelete: NoAction, onUpdate: NoAction)
|
||||
status ScheduleStatus? @relation(fields: [scheduleStatusRecId], references: [scheduleStatusRecId], onDelete: NoAction, onUpdate: NoAction)
|
||||
type ScheduleType @relation(fields: [scheduleTypeRecId], references: [scheduleTypeRecId], onDelete: NoAction, onUpdate: NoAction)
|
||||
span ScheduleSpan? @relation(fields: [scheduleSpanRecId], references: [scheduleSpanRecId], onDelete: NoAction, onUpdate: NoAction)
|
||||
|
||||
@@map("Schedule")
|
||||
@@schema("dbo")
|
||||
@@ -2398,3 +2421,246 @@ model ScheduleDetail {
|
||||
@@map("Schedule_Detail")
|
||||
@@schema("dbo")
|
||||
}
|
||||
|
||||
// =====================
|
||||
// TIME
|
||||
// =====================
|
||||
|
||||
model TimeEntry {
|
||||
companyRecId Int @map("Company_RecID")
|
||||
timeRecId Int @map("Time_RecID")
|
||||
enteredBy String? @map("Entered_By") @db.NVarChar(15)
|
||||
memberId String? @map("Member_ID") @db.NVarChar(15)
|
||||
|
||||
dateStart DateTime? @map("Date_Start") @db.DateTime
|
||||
timeStart DateTime? @map("Time_Start") @db.DateTime
|
||||
timeEnd DateTime? @map("Time_End") @db.DateTime
|
||||
hourlyRate Float? @map("Hourly_Rate") @db.SmallMoney
|
||||
hoursBill Decimal @map("Hours_Bill") @db.Decimal(18, 2)
|
||||
|
||||
invoiceFlag Boolean @map("Invoice_Flag")
|
||||
|
||||
lastUpdate DateTime? @map("Last_Update") @db.DateTime
|
||||
updatedBy String? @map("Updated_By") @db.NVarChar(15)
|
||||
|
||||
pmProjectRecId Int? @map("PM_Project_RecID")
|
||||
|
||||
hoursActual Decimal @map("Hours_Actual") @db.Decimal(18, 2)
|
||||
billableFlag Boolean @map("Billable_Flag")
|
||||
billingLogRecId Int? @map("Billing_Log_RecID")
|
||||
|
||||
srServiceRecId Int? @map("SR_Service_RecID")
|
||||
|
||||
activityTypeRecId Int? @map("Activity_Type_RecID")
|
||||
activityClassRecId Int? @map("Activity_Class_RecID")
|
||||
|
||||
teStatusId Int @map("TE_Status_ID") @db.SmallInt
|
||||
timeSheetRecId Int? @map("Time_Sheet_RecID")
|
||||
teChargeCodeRecId Int? @map("TE_Charge_Code_RecID")
|
||||
|
||||
billingUnitRecId Int @map("Billing_Unit_RecID")
|
||||
ownerLevelRecId Int @map("Owner_Level_RecID")
|
||||
|
||||
memberRecId Int? @map("Member_RecID")
|
||||
|
||||
hoursInvoiced Decimal? @map("Hours_Invoiced") @db.Decimal(18, 2)
|
||||
adjustment Decimal @map("Adjustment") @db.Decimal(18, 2)
|
||||
|
||||
memberTypeRecId Int? @map("Member_Type_RecID")
|
||||
|
||||
agrAmount Decimal @map("Agr_Amount") @db.Decimal(18, 2)
|
||||
agrHeaderRecId Int? @map("Agr_Header_RecID")
|
||||
agrAdjustment Decimal? @map("Agr_Adjustment") @db.Decimal(18, 2)
|
||||
agrHours Decimal? @map("Agr_Hours") @db.Decimal(18, 2)
|
||||
agrMonth Int? @map("Agr_Month") @db.SmallInt
|
||||
agrYear Int? @map("Agr_Year") @db.SmallInt
|
||||
|
||||
standardRate Decimal? @map("Standard_Rate") @db.Decimal(18, 2)
|
||||
effectiveRate Decimal? @map("Effective_Rate") @db.Decimal(18, 2)
|
||||
|
||||
hoursDeduct Decimal? @map("Hours_Deduct") @db.Decimal(18, 2)
|
||||
|
||||
contactRecId Int? @map("Contact_RecID")
|
||||
|
||||
soActivityRecId Int? @map("SO_Activity_RecID")
|
||||
mobileGuid String @map("Mobile_GUID") @db.UniqueIdentifier
|
||||
billingSr Int? @map("billing_sr")
|
||||
|
||||
signatureRecId Int? @map("Signature_RecID")
|
||||
signatureHours Decimal? @map("Signature_Hours") @db.Decimal(18, 2)
|
||||
|
||||
exchangeHref String? @map("exchange_href") @db.NVarChar(300)
|
||||
teProblemFlag Boolean @map("TE_Problem_Flag")
|
||||
teResolutionFlag Boolean @map("TE_Resolution_Flag")
|
||||
teInternalAnalysisFlag Boolean @map("TE_InternalAnalysis_Flag")
|
||||
|
||||
documentFlag Boolean @map("Document_Flag")
|
||||
|
||||
dateFormat Int? @map("Date_Format")
|
||||
|
||||
dbTimestamp Bytes @map("DB_Timestamp") @db.VarBinary(8)
|
||||
timeStartUtc DateTime? @map("Time_Start_UTC") @db.DateTime
|
||||
timeEndUtc DateTime? @map("Time_End_UTC") @db.DateTime
|
||||
lastUpdateUtc DateTime? @map("Last_Update_UTC") @db.DateTime
|
||||
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime
|
||||
|
||||
overageRate Float? @map("Overage_Rate") @db.SmallMoney
|
||||
|
||||
extendedInvoiceAmount Decimal? @map("Extended_Invoice_Amount") @db.Decimal(31, 6)
|
||||
extendedBillAmount Decimal? @map("Extended_Bill_Amount") @db.Decimal(31, 6)
|
||||
|
||||
notificationHistory String @map("Notification_History") @db.VarChar(4000)
|
||||
mergedFlag Boolean @map("Merged_Flag")
|
||||
|
||||
internalNote String? @map("Internal_Note") @db.NVarChar(Max)
|
||||
reference String? @map("Reference") @db.NVarChar(100)
|
||||
|
||||
originalAuthor String? @map("Original_Author") @db.NVarChar(150)
|
||||
|
||||
costPerHour String @map("Cost_Per_Hour") @db.NVarChar(2000)
|
||||
overrideFlag Boolean @map("Override_Flag")
|
||||
issueFlag Boolean @map("Issue_Flag")
|
||||
|
||||
notes String? @map("Notes") @db.NVarChar(4000)
|
||||
notesMarkdown String? @map("Notes_Markdown") @db.NVarChar(Max)
|
||||
|
||||
chargeToRecId Int? @map("Charge_To_RecID")
|
||||
chargeToType String? @map("Charge_To_Type") @db.NVarChar(13)
|
||||
|
||||
teChargeCode TeChargeCode? @relation(fields: [teChargeCodeRecId], references: [teChargeCodeRecId], onDelete: NoAction, onUpdate: NoAction)
|
||||
memberType MemberType? @relation(fields: [memberTypeRecId], references: [memberTypeRecId], onDelete: NoAction, onUpdate: NoAction)
|
||||
|
||||
@@id([companyRecId, timeRecId])
|
||||
@@map("Time_Entry")
|
||||
@@schema("dbo")
|
||||
}
|
||||
|
||||
model SoActivityType {
|
||||
soActivityTypeRecId Int @id @map("SO_Activity_Type_RecID")
|
||||
soActivityTypeId String? @map("SO_Activity_Type_ID") @db.NVarChar(15)
|
||||
|
||||
description String? @map("Description") @db.NVarChar(50)
|
||||
|
||||
historyFlag Boolean @map("History_Flag")
|
||||
|
||||
updatedBy String @map("Updated_By") @db.NVarChar(15)
|
||||
cleanUpFlag Boolean @map("CleanUp_Flag")
|
||||
defaultFlag Boolean @map("Default_Flag")
|
||||
importFlag Boolean @map("Import_Flag")
|
||||
emailFlag Boolean @map("email_flag")
|
||||
memoFlag Boolean? @map("Memo_Flag")
|
||||
pointsValue Int? @map("Points_Value")
|
||||
inactiveFlag Boolean? @map("Inactive_Flag")
|
||||
lastUpdateUtc DateTime @map("Last_Update_UTC") @db.DateTime2
|
||||
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
|
||||
enteredBy String @map("Entered_By") @db.NVarChar(15)
|
||||
id String @map("Id") @db.UniqueIdentifier
|
||||
|
||||
@@map("SO_Activity_Type")
|
||||
@@schema("dbo")
|
||||
}
|
||||
|
||||
model SoActStatus {
|
||||
soActStatusRecId Int @id @map("SO_Act_Status_RecID")
|
||||
description String? @map("Description") @db.NVarChar(30)
|
||||
|
||||
defaultFlag Boolean @map("Default_Flag")
|
||||
closedFlag Boolean @map("Closed_Flag")
|
||||
inactiveFlag Boolean @map("Inactive_Flag")
|
||||
spawnFollowupFlag Boolean @map("spawn_followup_flag")
|
||||
|
||||
lastUpdate DateTime @map("Last_Update") @db.DateTime2
|
||||
lastUpdateUtc DateTime @map("Last_Update_UTC") @db.DateTime2
|
||||
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
|
||||
|
||||
updatedBy String? @map("Updated_By") @db.NVarChar(15)
|
||||
enteredBy String @map("Entered_By") @db.NVarChar(15)
|
||||
|
||||
id String @map("Id") @db.UniqueIdentifier
|
||||
|
||||
@@map("SO_Act_Status")
|
||||
@@schema("dbo")
|
||||
}
|
||||
|
||||
model SoActivityNotes {
|
||||
soActivityNotesRecId Int @id @map("SO_Activity_Notes_RecID")
|
||||
soActivityRecId Int @unique @map("SO_Activity_RecID")
|
||||
notes String @map("Notes") @db.NVarChar(Max)
|
||||
internalAnalysisFlag Boolean @map("Internal_Analysis_Flag")
|
||||
dateCreatedUtc DateTime @map("Date_Created_UTC") @db.DateTime2
|
||||
enteredBy String @map("Entered_By") @db.NVarChar(15)
|
||||
lastUpdateUtc DateTime @map("Last_Update_UTC") @db.DateTime2
|
||||
updatedBy String @map("Updated_By") @db.NVarChar(15)
|
||||
|
||||
soActivity SoActivity @relation(fields: [soActivityRecId], references: [soActivityRecId], onDelete: NoAction, onUpdate: NoAction)
|
||||
|
||||
@@map("SO_Activity_Notes")
|
||||
@@schema("dbo")
|
||||
}
|
||||
|
||||
// =====================
|
||||
// TIME ENTRY LOOKUPS
|
||||
// =====================
|
||||
|
||||
model TeStatus {
|
||||
teStatusRecId Int @id @map("TE_Status_RecID")
|
||||
teStatusId Int @map("TE_Status_ID") @db.SmallInt
|
||||
description String? @map("Description") @db.NVarChar(50)
|
||||
action String? @map("Action") @db.NVarChar(50)
|
||||
lastUpdatedUtc DateTime @map("Last_Updated_UTC") @db.DateTime2
|
||||
localeKeyRecId Int? @map("Locale_Key_RecID")
|
||||
|
||||
@@map("TE_Status")
|
||||
@@schema("dbo")
|
||||
}
|
||||
|
||||
model TeChargeCode {
|
||||
teChargeCodeRecId Int @id @map("TE_Charge_Code_RecID")
|
||||
|
||||
description String? @map("Description") @db.NVarChar(50)
|
||||
|
||||
companyRecId Int? @map("Company_RecID")
|
||||
ownerLevelRecId Int? @map("Owner_Level_RecID")
|
||||
billingUnitRecId Int? @map("Billing_Unit_RecID")
|
||||
|
||||
activityClassRecId Int? @map("Activity_Class_RecID")
|
||||
activityTypeRecId Int? @map("Activity_Type_RecID")
|
||||
|
||||
expenseFlag Boolean @map("Expense_Flag")
|
||||
timeFlag Boolean @map("Time_Flag")
|
||||
|
||||
updatedBy String? @map("Updated_By") @db.NVarChar(15)
|
||||
lastUpdate DateTime @map("Last_Update") @db.DateTime2
|
||||
billableFlag Boolean @map("Billable_Flag")
|
||||
exTypeFlag Boolean @map("EX_Type_Flag")
|
||||
invoiceFlag Boolean? @map("Invoice_Flag")
|
||||
integrationXref String? @map("Integration_Xref") @db.NVarChar(50)
|
||||
lastUpdateUtc DateTime @map("Last_Update_UTC") @db.DateTime2
|
||||
enteredBy String @map("Entered_By") @db.NVarChar(15)
|
||||
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
|
||||
id String @map("Id") @db.UniqueIdentifier
|
||||
|
||||
scheduleTypes ScheduleType[]
|
||||
timeEntries TimeEntry[]
|
||||
|
||||
@@map("TE_Charge_Code")
|
||||
@@schema("dbo")
|
||||
}
|
||||
|
||||
model MemberType {
|
||||
memberTypeRecId Int @id @map("Member_Type_RecID")
|
||||
description String? @map("Description") @db.NVarChar(30)
|
||||
inactiveFlag Boolean @map("Inactive_Flag")
|
||||
updatedBy String? @map("Updated_By") @db.NVarChar(15)
|
||||
lastUpdate DateTime @map("Last_Update") @db.DateTime2
|
||||
lastUpdateUtc DateTime @map("Last_Update_UTC") @db.DateTime2
|
||||
enteredBy String @map("Entered_By") @db.NVarChar(15)
|
||||
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
|
||||
id String @map("Id") @db.UniqueIdentifier
|
||||
|
||||
members Member[]
|
||||
timeEntries TimeEntry[]
|
||||
|
||||
@@map("Member_Type")
|
||||
@@schema("dbo")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user