Files
optima/dalpuri/prisma/schema.prisma
T
2026-04-07 23:56:31 +00:00

2401 lines
129 KiB
Plaintext

generator client {
provider = "prisma-client-js"
output = "../generated/prisma"
}
datasource db {
provider = "sqlserver"
schemas = ["dbo"]
}
// =====================
// PRODUCT / INVENTORY
// =====================
model ProductCatalog {
catalogRecId Int @id @map("IV_Item_RecID")
itemId String? @map("Item_ID") @db.NVarChar(75)
description String? @map("Description") @db.NVarChar(60)
typeRecId Int? @map("IV_Type_RecID")
subcategoryRecId Int? @map("IV_SubCat_RecID")
uomRecId Int? @map("IV_UOM_RecID")
currentCost Decimal? @map("Current_Cost") @db.Decimal(18, 6)
listPrice Decimal @map("List_Price") @db.Decimal(18, 6)
taxableFlag Boolean @map("Taxable_Flag")
manufacturerPartNum String? @map("Mfg_Item_ID") @db.NVarChar(50)
inactiveFlag Boolean @map("Inactive_Flag")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime
longDescription String? @map("Long_Description") @db.NVarChar(Max)
serializedFlag Boolean? @map("Serialized_Flag")
classId String? @map("IV_Class_ID") @db.Char(1)
manufacturerRecId Int? @map("Manufacturer_RecID")
vendorRecId Int? @map("Vendor_RecID")
vendorSku String? @map("Vendor_SKU") @db.NVarChar(50)
notes String? @map("Notes") @db.NVarChar(Max)
minimumStock Int? @map("Minimum_Stock")
priceAttributeId String? @map("IV_Price_Attribute_ID") @db.Char(1)
calcPriceFlag Boolean @map("Calc_Price_Flag")
calcCostFlag Boolean @map("Calc_Cost_Flag")
serializedCostFlag Boolean @map("SerializedCost_Flag")
phaseProductFlag Boolean @map("Phase_Product_Flag")
integrationXref String? @map("Integration_Xref") @db.NVarChar(50)
slaRecId Int? @map("SR_SLA_RecID")
recurringRevenue Decimal? @map("Recurring_Revenue") @db.Decimal(18, 2)
recurringCost Decimal? @map("Recurring_Cost") @db.Decimal(18, 2)
recurringDateStart DateTime? @map("Recurring_Date_Start") @db.DateTime
recurringDateEnd DateTime? @map("Recurring_Date_End") @db.DateTime
billCycleId String? @map("Bill_Cycle_ID") @db.NVarChar(5)
cycleBasisId String? @map("Cycle_Basis_ID") @db.Char(1)
recurringFlag Boolean @map("Recurring_Flag")
customerUsageTypeRecId Int? @map("Customer_Usage_Type_RecID")
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime
recurringOneTimeFlag Boolean @map("Recurring_OneTime_Flag")
purchaseTaxFlag Boolean @map("Purchase_Tax_Flag")
dropShipFlag Boolean @map("Drop_Ship_Flag")
specialOrderFlag Boolean @map("Special_Order_Flag")
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime
enteredBy String @map("Entered_By") @db.NVarChar(15)
billableOptionsRecId Int? @map("Billable_Options_RecID")
id String @map("Id") @db.UniqueIdentifier
agrTypeRecId Int? @map("AGR_Type_RecID")
markupPercentage Decimal? @map("Markup_Percentage") @db.Decimal(5, 2)
markupFlag Boolean @map("Markup_Flag")
autoUpdateUnitCostFlag Boolean @map("Auto_Update_Unit_Cost_Flag")
autoUpdateUnitPriceFlag Boolean @map("Auto_Update_Unit_Price_Flag")
type ProductType? @relation(fields: [typeRecId], references: [typeRecId], onDelete: NoAction, onUpdate: NoAction)
subcategory ProductSubcategory? @relation(fields: [subcategoryRecId], references: [subcategoryRecId], onDelete: NoAction, onUpdate: NoAction)
manufacturer Manufacturer? @relation(fields: [manufacturerRecId], references: [manufacturerRecId], onDelete: NoAction, onUpdate: NoAction)
ivProducts IV_Product[]
inventory ProductInventory[]
itemVendors ItemVendor[]
minimumStockByWarehouse MinimumStockByWarehouse[]
@@map("IV_Item")
@@schema("dbo")
}
model IV_Product {
ivProductRecId Int @id @map("IV_Product_RecID")
billingLogRecId Int? @map("Billing_Log_RecID")
catalogRecId Int @map("IV_Item_RecID")
description String? @map("Description") @db.NVarChar(Max)
quantity Decimal? @map("Quantity") @db.Decimal(18, 2)
unitPrice Decimal? @map("Unit_Price") @db.Decimal(18, 6)
unitCost Decimal? @map("Unit_Cost") @db.Decimal(18, 6)
billableFlag Boolean @map("Billable_Flag")
invoiceFlag Boolean @map("Invoice_Flag")
taxableFlag Boolean @map("Taxable_Flag")
ownerLevelRecId Int @map("Owner_Level_RecID")
billingUnitRecId Int? @map("Billing_Unit_RecID")
srServiceRecId Int? @map("SR_Service_RecID")
pmProjectRecId Int? @map("PM_Project_RecID")
agrHeaderRecId Int? @map("AGR_Header_RecID")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime
agrAmount Decimal? @map("AGR_Amount") @db.Decimal(18, 2)
dateEntered DateTime? @map("Date_Entered") @db.DateTime
agrMonth Int? @map("AGR_Month") @db.SmallInt
agrYear Int? @map("AGR_Year") @db.SmallInt
teStatusId Int @map("TE_Status_ID") @db.SmallInt
agrDetailRecId Int? @map("AGR_Detail_RecID")
billingSr Int? @map("billing_sr")
dropShipFlag Boolean @map("DropShip_Flag")
shipmentMethodRecId Int? @map("ShipmentMethod_RecID")
subSuppliedFlag Boolean @map("Sub_Supplied_Flag")
subShipToRecId Int? @map("Sub_ShipTo_RecID")
subLimit Decimal? @map("Sub_Limit") @db.Decimal(18, 2)
cnGuid String? @map("cn_guid") @db.NVarChar(50)
cnDirtyFlag Boolean @map("Cn_Dirty_Flag")
mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier
warehouseBinRecId Int? @map("Warehouse_Bin_RecID")
warehouseRecId Int? @map("Warehouse_RecID")
received Boolean? @map("Received")
orderHeaderRecId Int? @map("Order_Header_RecID")
cancelFlag Boolean @map("Cancel_Flag")
cancelDate DateTime? @map("Cancel_Date") @db.DateTime
cancelBy Int? @map("Cancel_By")
cancelReason String? @map("Cancel_Reason") @db.NVarChar(100)
quantityCancelled Decimal? @map("Quantity_Cancelled") @db.Decimal(18, 2)
internalNote String? @map("Internal_Note") @db.NVarChar(1000)
poApprovedFlag Boolean @map("PO_Approved_Flag")
auditText String? @map("Audit_Text") @db.NVarChar(50)
opportunityRecId Int? @map("Opportunity_RecID")
soForecastDtlRecId Int? @map("SO_Forecast_Dtl_RecID")
calcPriceFlag Boolean @map("Calc_Price_Flag")
calcCostFlag Boolean @map("Calc_Cost_Flag")
quoteFlag Boolean @map("Quote_Flag")
quoteWerksFlag Boolean @map("QuoteWerks_Flag")
subNumber Int @map("Sub_Number")
quoteWerksDocNo String? @map("QuoteWerks_DocNO") @db.NVarChar(50)
quoteWerksDocName String? @map("QuoteWerks_DocName") @db.NVarChar(255)
closedFlag Boolean @map("Closed_Flag")
closedBy String? @map("Closed_By") @db.NVarChar(15)
dateClosed DateTime? @map("Date_Closed") @db.DateTime
flatrateFlag Boolean @map("Flatrate_Flag")
extendedPriceAmount Decimal? @map("Extended_Price_Amount") @db.Decimal(18, 6)
extendedCostAmount Decimal? @map("Extended_Cost_Amount") @db.Decimal(18, 6)
convertedRecId Int? @map("Converted_RecID")
qtyIncluded Decimal @map("Qty_Included") @db.Decimal(18, 2)
specialOrderFlag Boolean @map("Special_Order_Flag")
minimumStockFlag Boolean @map("Minimum_Stock_Flag")
qtyShipped Decimal @map("Qty_Shipped") @db.Decimal(18, 2)
qtyPicked Decimal @map("Qty_Picked") @db.Decimal(18, 2)
receivedFlag Boolean @map("Received_Flag")
detailShipmentMethod String? @map("Detail_ShipmentMethod") @db.NVarChar(200)
purchaseInfo String? @map("Purchase_Info") @db.NVarChar(Max)
detailSerialList String? @map("Detail_Serial_List") @db.NVarChar(Max)
agdAdditionSerialNumber String? @map("AGD_Addition_Serial_Number") @db.NVarChar(50)
phaseProductFlag Boolean @map("Phase_Product_Flag")
shortDescription String? @map("Short_Description") @db.NVarChar(2000)
convertedProjectRecId Int? @map("Converted_Project_RecID")
sequenceNumber Decimal @map("Sequence_Number") @db.Decimal(8, 2)
childInvoiceOverrideFlag Boolean @map("Child_Invoice_Override_Flag")
opportunityExtPriceAmount Decimal? @map("Opportunity_Ext_Price_Amount") @db.Decimal(18, 6)
opportunityExtCostAmount Decimal? @map("Opportunity_Ext_Cost_Amount") @db.Decimal(18, 6)
soOppStatusRecId Int? @map("SO_Opp_Status_RecID")
qtyPurchased Int @map("Qty_Purchased")
vendorRecId Int? @map("Vendor_RecID")
srSlaRecId Int? @map("SR_SLA_RecID")
qtyConvert Int @map("Qty_Convert")
recurringRevenue Decimal? @map("Recurring_Revenue") @db.Decimal(18, 2)
recurringCost Decimal? @map("Recurring_Cost") @db.Decimal(18, 6)
recurringDateStart DateTime? @map("Recurring_Date_Start") @db.DateTime
recurringDateEnd DateTime? @map("Recurring_Date_End") @db.DateTime
billCycleId String? @map("Bill_Cycle_ID") @db.NVarChar(5)
cycleBasisId String? @map("Cycle_Basis_ID") @db.Char(1)
recurringFlag Boolean @map("Recurring_Flag")
customerUsageTypeRecId Int? @map("Customer_Usage_Type_RecID")
purchaseDate DateTime? @map("Purchase_Date") @db.Date
ivPriceMethodId String? @map("IV_Price_Method_ID") @db.NVarChar(2)
discountAmount Decimal? @map("Discount_Amount") @db.Decimal(18, 6)
listPrice Decimal? @map("List_Price") @db.Decimal(18, 6)
vendorSku String? @map("Vendor_SKU") @db.NVarChar(50)
convertedAgrDetailRecId Int? @map("Converted_AGR_Detail_RecID")
lastUpdatedUTC DateTime @map("Last_Update_UTC") @db.DateTime
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime
purchaseTrackingNumbers String? @map("Purchase_Tracking_Numbers") @db.NVarChar(200)
recurringOneTimeFlag Boolean @map("Recurring_OneTime_Flag")
enteredBy String @map("Entered_By") @db.NVarChar(15)
cancelDateUtc DateTime? @map("Cancel_Date_UTC") @db.DateTime
dateClosedUtc DateTime? @map("Date_Closed_UTC") @db.DateTime
shipSet String? @map("Ship_Set") @db.NVarChar(10)
invoiceGroupingRecId Int? @map("Invoice_Grouping_RecID")
asioSubscriptionsId String? @map("Asio_Subscriptions_ID") @db.UniqueIdentifier
id String? @map("Id") @db.UniqueIdentifier
changeOrderFlag Boolean @map("Change_Order_Flag")
agrTypeRecId Int? @map("AGR_Type_RecID")
splitFromRecId Int? @map("Split_From_RecID")
customFields V_IV_Product_Custom_Fields[]
productCatalog ProductCatalog @relation(fields: [catalogRecId], references: [catalogRecId], onDelete: NoAction, onUpdate: NoAction)
ownerLevel OwnerLevel @relation(fields: [ownerLevelRecId], references: [ownerLevelRecId], onDelete: NoAction, onUpdate: NoAction)
billingUnit BillingUnit? @relation(fields: [billingUnitRecId], references: [billingUnitRecId], onDelete: NoAction, onUpdate: NoAction)
srService SrService? @relation(fields: [srServiceRecId], references: [srServiceRecId], onDelete: NoAction, onUpdate: NoAction)
pmProject PmProject? @relation("IVProductProject", fields: [pmProjectRecId], references: [pmProjectRecId], onDelete: NoAction, onUpdate: NoAction)
opportunity Opportunity? @relation(fields: [opportunityRecId], references: [opportunityRecId], onDelete: NoAction, onUpdate: NoAction)
forecastItem SoForecastDtl? @relation(fields: [soForecastDtlRecId], references: [soForecastDtlRecId], onDelete: NoAction, onUpdate: NoAction)
soOppStatus SoOppStatus? @relation(fields: [soOppStatusRecId], references: [soOppStatusRecId], onDelete: NoAction, onUpdate: NoAction)
agrType AgrType? @relation(fields: [agrTypeRecId], references: [agrTypeRecId], onDelete: NoAction, onUpdate: NoAction)
warehouse Warehouse? @relation(fields: [warehouseRecId], references: [warehouseRecId], onDelete: NoAction, onUpdate: NoAction)
warehouseBin WarehouseBin? @relation(fields: [warehouseBinRecId], references: [warehouseBinRecId], onDelete: NoAction, onUpdate: NoAction)
convertedFrom IV_Product? @relation("IVProductConvertedFrom", fields: [convertedRecId], references: [ivProductRecId], onDelete: NoAction, onUpdate: NoAction)
convertedTo IV_Product[] @relation("IVProductConvertedFrom")
splitFrom IV_Product? @relation("IVProductSplitFrom", fields: [splitFromRecId], references: [ivProductRecId], onDelete: NoAction, onUpdate: NoAction)
splitChildren IV_Product[] @relation("IVProductSplitFrom")
convertedProject PmProject? @relation("IVProductConvertedProject", fields: [convertedProjectRecId], references: [pmProjectRecId], onDelete: NoAction, onUpdate: NoAction)
@@map("IV_Product")
@@schema("dbo")
}
model ProductType {
typeRecId Int @id @map("IV_Type_RecID")
description String? @map("Description") @db.NVarChar(50)
inactiveFlag Boolean @map("Inactive_Flag")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
itemTypeXref String? @map("Item_Type_Xref") @db.NVarChar(30)
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
enteredBy String @map("Entered_By") @db.NVarChar(15)
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
defaultFlag Boolean @map("Default_Flag")
id String @map("Id") @db.UniqueIdentifier
products ProductCatalog[]
@@map("IV_Type")
@@schema("dbo")
}
model ProductInventory {
inventoryRecId Int @id @map("Inventory_By_Warehouse_RecID")
catalogRecId Int @map("IV_Item_RecID")
warehouseRecId Int @map("Warehouse_RecID")
warehouseBinRecId Int @map("Warehouse_Bin_RecID")
qtyOnHand Decimal? @map("Qty_On_Hand") @db.Decimal(18, 2)
lastUpdate DateTime? @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(15)
productCatalog ProductCatalog @relation(fields: [catalogRecId], references: [catalogRecId], onDelete: NoAction, onUpdate: NoAction)
warehouse Warehouse @relation(fields: [warehouseRecId], references: [warehouseRecId], onDelete: NoAction, onUpdate: NoAction)
warehouseBin WarehouseBin @relation(fields: [warehouseBinRecId], references: [warehouseBinRecId], onDelete: NoAction, onUpdate: NoAction)
@@map("Inventory_By_Warehouse")
@@schema("dbo")
}
model Warehouse {
warehouseRecId Int @id @map("Warehouse_RecID")
companyRecId Int? @map("Company_RecID")
ownerLevelRecId Int? @map("Owner_Level_RecID")
billingUnitRecId Int? @map("Billing_Unit_RecID")
memberRecId Int? @map("Member_RecID")
companyAddressRecId Int? @map("Company_Address_RecID")
warehouseName String? @map("Warehouse_Name") @db.NVarChar(50)
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
defaultFlag Boolean? @map("Default_Flag")
overallDefaultFlag Boolean @map("OverallDefault_Flag")
locationXref String? @map("Location_Xref") @db.NVarChar(10)
inactiveFlag Boolean @map("Inactive_Flag")
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
enteredBy String @map("Entered_By") @db.NVarChar(15)
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
contactRecId Int? @map("Contact_RecID")
lockedFlag Boolean @map("Locked_Flag")
id String @map("Id") @db.UniqueIdentifier
inventory ProductInventory[]
ivProducts IV_Product[]
warehouseBins WarehouseBin[]
minimumStockByWarehouse MinimumStockByWarehouse[]
members Member[]
@@map("Warehouse")
@@schema("dbo")
}
model WarehouseBin {
warehouseBinRecId Int @id @map("Warehouse_Bin_RecID")
warehouseRecId Int? @map("Warehouse_RecID")
description String? @map("Description") @db.NVarChar(50)
ownerLevelRecId Int? @map("Owner_Level_RecID")
billingUnitRecId Int? @map("Billing_Unit_RecID")
length String? @map("Warehouse_Bin_Length") @db.NVarChar(10)
width String? @map("Warehouse_Bin_Width") @db.NVarChar(10)
height String? @map("Warehouse_Bin_Height") @db.NVarChar(10)
weight Int? @map("Warehouse_Bin_Weight")
minQuantity Decimal? @map("Min_Quantity") @db.Decimal(18, 2)
maxQuantity Decimal? @map("Max_Quantity") @db.Decimal(18, 2)
overflowBin Int? @map("Overflow_Bin")
memberRecId Int? @map("Member_RecID")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
defaultFlag Boolean? @map("Default_Flag")
inactiveFlag Boolean @map("Inactive_Flag")
lastUpdatedUtc 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
warehouse Warehouse? @relation(fields: [warehouseRecId], references: [warehouseRecId], onDelete: NoAction, onUpdate: NoAction)
inventory ProductInventory[]
ivProducts IV_Product[]
members Member[]
@@map("Warehouse_Bin")
@@schema("dbo")
}
model MinimumStockByWarehouse {
minimumStockByWarehouseRecId Int @id @map("Minimum_Stock_By_Warehouse_RecID")
catalogRecId Int @map("IV_Item_RecID")
warehouseRecId Int @map("Warehouse_RecID")
minimumStock Int @map("Minimum_Stock")
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(15)
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
enteredBy String? @map("Entered_By") @db.NVarChar(15)
productCatalog ProductCatalog @relation(fields: [catalogRecId], references: [catalogRecId], onDelete: NoAction, onUpdate: NoAction)
warehouse Warehouse @relation(fields: [warehouseRecId], references: [warehouseRecId], onDelete: NoAction, onUpdate: NoAction)
@@map("Minimum_Stock_By_Warehouse")
@@schema("dbo")
}
model ProductSubcategory {
subcategoryRecId Int @id @map("IV_SubCat_RecID")
categoryRecId Int @map("IV_Cat_RecID")
description String? @map("Description") @db.NVarChar(50)
inactiveFlag Boolean @map("Inactive_Flag")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
integrationXref String? @map("Integration_Xref") @db.NVarChar(50)
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
enteredBy String @map("Entered_By") @db.NVarChar(15)
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
defaultFlag Boolean @map("Default_Flag")
id String @map("Id") @db.UniqueIdentifier
category ProductCategory @relation(fields: [categoryRecId], references: [categoryRecId], onDelete: NoAction, onUpdate: NoAction)
products ProductCatalog[]
@@map("IV_SubCategory")
@@schema("dbo")
}
model ProductCategory {
categoryRecId Int @id @map("IV_Cat_RecID")
description String? @map("Description") @db.NVarChar(50)
inactiveFlag Boolean @map("Inactive_Flag")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
mobileDownload Boolean @map("Mobile_Download")
priceLevelXref String? @map("Price_Level_Xref") @db.NVarChar(10)
integrationXref String? @map("Integration_Xref") @db.NVarChar(50)
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
enteredBy String @map("Entered_By") @db.NVarChar(15)
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
defaultFlag Boolean @map("Default_Flag")
id String @map("Id") @db.UniqueIdentifier
subcategories ProductSubcategory[]
@@map("IV_Category")
@@schema("dbo")
}
model Manufacturer {
manufacturerRecId Int @id @map("Manufacturer_RecID")
manufacturerName String @map("Manufacturer_Name") @db.NVarChar(50)
inactiveFlag Boolean? @map("Inactive_Flag")
lastUpdate DateTime @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(30)
lastUpdatedUtc 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
products ProductCatalog[]
@@map("Manufacturer")
@@schema("dbo")
}
model ItemVendor {
itemVendorId Int @id @map("IV_Item_Vendor_ID")
catalogRecId Int @map("IV_Item_RecID")
vendorRecId Int? @map("Vendor_RecID")
vendorSku String? @map("Vendor_SKU") @db.NVarChar(50)
isPreferredVendor Boolean @map("Is_Preferred_Vendor")
productCatalog ProductCatalog @relation(fields: [catalogRecId], references: [catalogRecId], onDelete: NoAction, onUpdate: NoAction)
@@map("iv_item_Vendor")
@@schema("dbo")
}
// =====================
// COMPANY
// =====================
model Company {
companyRecId Int @id @map("Company_RecID")
companyId String? @map("Company_ID") @db.NVarChar(50)
companyName String? @map("Company_Name") @db.NVarChar(50)
phoneNbr String? @map("PhoneNbr") @db.NVarChar(30)
phoneNbrFax String? @map("PhoneNbr_Fax") @db.NVarChar(30)
websiteUrl String? @map("Website_URL") @db.NVarChar(255)
accountNbr String? @map("Account_Nbr") @db.NVarChar(128)
timeZoneRecId Int? @map("Time_Zone_RecID")
sicCodeId String? @map("SIC_Code_ID") @db.NVarChar(10)
remitToRecId Int? @map("Remit_To_RecID")
lastUpdate DateTime @map("Last_Update") @db.DateTime2
updatedBy String @map("Updated_By") @db.NVarChar(15)
companyStatusRecId Int? @map("Company_Status_RecID")
taxCodeRecId Int? @map("Tax_Code_RecID")
currencyRecId Int? @map("Currency_RecID")
ownerLevelRecId Int? @map("Owner_Level_RecID")
userfield1 String? @map("Userfield_1") @db.NVarChar(50)
userfield2 String? @map("Userfield_2") @db.NVarChar(50)
userfield3 String? @map("Userfield_3") @db.NVarChar(50)
userfield4 String? @map("Userfield_4") @db.NVarChar(50)
userfield5 String? @map("Userfield_5") @db.NVarChar(50)
userfield6 String? @map("Userfield_6") @db.NVarChar(50)
userfield7 String? @map("Userfield_7") @db.NVarChar(50)
userfield8 String? @map("Userfield_8") @db.NVarChar(50)
userfield9 String? @map("Userfield_9") @db.NVarChar(50)
userfield10 String? @map("Userfield_10") @db.NVarChar(50)
deleteFlag Boolean @map("Delete_Flag")
dateDeleted DateTime? @map("Date_Deleted") @db.DateTime2
deletedBy String? @map("deleted_by") @db.NVarChar(15)
marketRecId Int? @map("Market_RecID")
leadFlag Boolean @map("Lead_Flag")
leadSource String? @map("Lead_Source") @db.NVarChar(50)
parentCompanyRecId Int? @map("Parent_Company_RecID")
annualRevenue Decimal @map("Annual_Revenue") @db.Decimal(18, 2)
revenueYear Int? @map("Revenue_Year")
nbrEmployees Int? @map("Nbr_Employees")
ownershipTypeRecId Int? @map("Ownership_Type_RecID")
dateEntered DateTime @map("Date_Entered") @db.DateTime2
billingTermsRecId Int? @map("Billing_Terms_RecID")
billingDeliveryRecId Int? @map("Billing_Delivery_RecID")
internalFlag Boolean @map("Internal_Flag")
srNotify String? @map("SR_Notify") @db.Char(1)
autoAssignFlag Boolean @map("AutoAssign_Flag")
srSignoffRecId Int @map("SR_Signoff_RecID")
billOverrideFlag Boolean @map("Bill_Override_Flag")
billSrFlag Boolean @map("Bill_SR_Flag")
billCompleteSrFlag Boolean @map("Bill_Complete_SR_Flag")
billUnapprovedSrFlag Boolean @map("Bill_Unapproved_SR_Flag")
billCompletePmFlag Boolean @map("Bill_Complete_PM_Flag")
billUnapprovedPmFlag Boolean @map("Bill_Unapproved_PM_Flag")
billRestrictDownPaymentPmFlag Boolean @map("Bill_Restrict_Down_Payment_PM_Flag")
approvalFlag Boolean @map("Approval_Flag")
taxId String? @map("Tax_ID") @db.NVarChar(50)
exchangeHref String? @map("Exchange_Href") @db.NVarChar(500)
unsubscribeFlag Boolean? @map("Unsubscribe_Flag")
vendorNbr String? @map("Vendor_Nbr") @db.NVarChar(128)
priceHeaderRecId Int? @map("IV_Price_Header_RecID")
emailCcFlag Boolean @map("Email_Cc_Flag")
emailCcAddress String? @map("Email_Cc_Address") @db.NVarChar(1000)
mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier
officeCalendarRecId Int? @map("Office_Calendar_RecID")
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
dateDeletedUtc DateTime? @map("Date_Deleted_UTC") @db.DateTime2
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
enteredBy String @map("Entered_By") @db.NVarChar(15)
dateAcquiredUtc DateTime? @map("Date_Acquired_UTC") @db.DateTime2
profileLastUpdateUtc DateTime? @map("Profile_Last_Update_UTC") @db.DateTime2
profileLastUpdatedBy String? @map("Profile_Last_Updated_By") @db.NVarChar(15)
annualRevenueUpdateUtc DateTime @map("Annual_Revenue_Update_UTC") @db.DateTime2
customerUsageTypeRecId Int? @map("Customer_Usage_Type_RecID")
notificationHistory String @map("Notification_History") @db.NVarChar(Max)
invTemplateSetupRecId Int? @map("BL_InvTemplate_Setup_RecID")
emailTemplateRecId Int? @map("Email_Template_RecID")
optionsLastUpdateUtc DateTime @map("Options_Last_Update_UTC") @db.DateTime2
optionsUpdatedBy String @map("Options_Updated_By") @db.NVarChar(15)
yearEstablished Int? @map("Year_Established") @db.SmallInt
resellerId String? @map("Reseller_Id") @db.NVarChar(128)
coreEntityCompanyId String? @map("Core_Entity_Company_ID") @db.NVarChar(36)
coreEntityUpdatedBy String @map("Core_Entity_Updated_By") @db.NVarChar(15)
coreEntityLastUpdateUtc DateTime @map("Core_Entity_Last_Update_UTC") @db.DateTime2
m365ContactSyncFlag Boolean @map("M365_Contact_Sync_Flag")
id String? @map("Id") @db.UniqueIdentifier
creditLimit Decimal? @map("Credit_Limit") @db.Decimal(18, 2)
additionalDebt Decimal? @map("Additional_Debt") @db.Decimal(18, 2)
members Member[]
opportunities Opportunity[]
@@map("Company")
@@schema("dbo")
}
// =====================
// MEMBER
// =====================
model Member {
memberRecId Int @id @map("Member_RecID")
memberId String @map("Member_ID") @db.NVarChar(15)
firstName String? @map("First_Name") @db.NVarChar(30)
lastName String? @map("Last_Name") @db.NVarChar(30)
mapiName String? @map("MAPI_Name") @db.NVarChar(256)
ownerLevelId Int? @map("Owner_Level_ID") @db.SmallInt
ownerLevelRecId Int? @map("Owner_Level_RecID")
roleId String? @map("Role_ID") @db.NVarChar(30)
emailAddress String? @map("Email_Address") @db.NVarChar(250)
inactiveFlag Boolean @map("Inactive_Flag")
memberPw String? @map("Member_PW") @db.NVarChar(60)
daysTolerance Int? @map("Days_Tolerance")
hoursMin Decimal? @map("Hours_Min") @db.Decimal(18, 2)
timeFlag Boolean @map("Time_Flag")
reportsTo String? @map("Reports_To") @db.NVarChar(15)
approvedBy String? @map("Approved_By") @db.NVarChar(15)
notes String? @map("Notes") @db.NVarChar(Max)
lastUpdate DateTime @map("Last_Update") @db.DateTime
updatedBy String? @map("Updated_By") @db.NVarChar(15)
exchangeServer String? @map("Exchange_Server") @db.NVarChar(50)
connectSync Boolean @map("ConnectSync")
adminFlag Boolean @map("Admin_Flag")
billingUnitRecId Int? @map("Billing_Unit_RecID")
timeStartEndFlag Boolean @map("Time_StartEnd_Flag")
time24hrFlag Boolean @map("Time_24hr_Flag")
activityClassRecId Int? @map("Activity_Class_RecID")
billableForecast Decimal? @map("Billable_Forecast") @db.Decimal(18, 2)
dailyCapacity Decimal? @map("Daily_Capacity") @db.Decimal(18, 2)
disableLoginFlag Boolean? @map("Disable_Login_Flag")
defaultLocRecId Int? @map("Default_Loc_RecID")
restrictLocFlag Boolean? @map("Restrict_Loc_Flag")
restrictBuFlag Boolean? @map("Restrict_BU_Flag")
requireExpFlag Boolean? @map("Require_Exp_Flag")
requireTimeFlag Boolean? @map("Require_Time_Flag")
restrictSbFlag Boolean? @map("Restrict_SB_Flag")
restrictTerFlag Boolean? @map("Restrict_Ter_Flag")
defaultTerRecId Int? @map("Default_Ter_RecID")
hourlyCost String? @map("Hourly_Cost") @db.NVarChar(10)
teDateStart DateTime? @map("TE_Date_Start") @db.Date
timeEntryScreen String? @map("Time_Entry_Screen") @db.NVarChar(10)
hourlyRate Decimal? @map("Hourly_Rate") @db.Decimal(18, 2)
enterPartsFlag Boolean @map("Enter_Parts_Flag")
enterCompanyFlag Boolean @map("Enter_Company_Flag")
expApprover String? @map("Exp_Approver") @db.NVarChar(15)
utilizationFlag Boolean @map("Utilization_Flag")
memberTypeRecId Int? @map("Member_Type_RecID")
srOwnerLevelRecId Int? @map("SR_Owner_Level_RecID")
srBillingUnitRecId Int? @map("SR_Billing_Unit_RecID")
title String? @map("Title") @db.NVarChar(50)
middleInitial String? @map("Middle_Initial") @db.Char(1)
emailOverride String? @map("Email_Override") @db.NVarChar(50)
dateInactive DateTime? @map("Date_Inactive") @db.DateTime
systemFlag Boolean? @map("System_Flag")
schOlRecId Int? @map("Sch_OL_RecID")
schBuRecId Int? @map("Sch_BU_RecID")
schRestrictFlag Boolean? @map("Sch_Restrict_Flag")
schNoDisplayFlag Boolean? @map("Sch_NoDisplay_Flag")
restrictSbLocFlag Boolean? @map("Restrict_SB_Loc_Flag")
srBoardRecId Int? @map("SR_Board_RecID")
mobileFlag Boolean? @map("Mobile_Flag")
schedCapacity Decimal? @map("Sched_Capacity") @db.Decimal(18, 2)
memberChooserLast String? @map("MemberChooserLast") @db.NVarChar(30)
skillChooserLast Int? @map("SkillChooserLast")
timeZoneRecId Int? @map("time_zone_recid")
brHeaderRecId Int? @map("BR_Header_RecID")
activityTypeRecId Int? @map("Activity_Type_RecID")
showDispatchPortal Boolean? @map("ShowDispatchPortal")
defaultScheduleView Int @map("DefaultScheduleView") @db.TinyInt
exCompanyFlag Boolean @map("EX_Company_Flag")
teCellEntry Boolean? @map("TE_CellEntry")
phoneNbr String? @map("PhoneNbr") @db.NVarChar(15)
phoneNbrExt String? @map("PhoneNbr_Ext") @db.NVarChar(10)
phoneNbr2 String? @map("PhoneNbr2") @db.NVarChar(15)
phoneNbr2Mobile String? @map("PhoneNbr2_Mobile") @db.NVarChar(10)
phoneNbr3 String? @map("PhoneNbr3") @db.NVarChar(15)
phoneNbr3Ext String? @map("PhoneNbr3_Ext") @db.NVarChar(10)
emailAddress2 String? @map("Email_Address2") @db.NVarChar(250)
emailAddress3 String? @map("Email_Address3") @db.NVarChar(250)
defaultPhone Int? @map("Default_Phone") @db.SmallInt
defaultEmail Int? @map("Default_Email") @db.SmallInt
memberClass String @map("Member_Class") @db.Char(1)
useSkypeFlag Boolean? @map("Use_Skype_Flag")
phoneIntFlag Boolean @map("PhoneInt_Flag")
defaultMyScheduleView Int @map("DefaultMyScheduleView") @db.TinyInt
signature String? @map("Signature") @db.NVarChar(Max)
restrictPmLocFlag Boolean @map("Restrict_PM_Loc_Flag")
pmOwnerLevelRecId Int? @map("PM_Owner_Level_RecID")
restrictPmBuFlag Boolean @map("Restrict_PM_BU_Flag")
pmBillingUnitRecId Int? @map("PM_Billing_Unit_Recid")
defaultAutoRefreshOption Int? @map("Default_Auto_Refresh_Option")
descSize String? @map("DescSize") @db.NVarChar(50)
analysisSize String? @map("AnalysisSize") @db.NVarChar(50)
resolutionSize String? @map("ResolutionSize") @db.NVarChar(50)
defaultDispatchPanel Int? @map("Default_Dispatch_Panel")
defaultOpportunityShowAll Boolean? @map("Default_Opportunity_Show_All")
dateHire DateTime? @map("Date_Hire") @db.Date
warehouseRecId Int? @map("Warehouse_RecID")
warehouseFlag Boolean? @map("Warehouse_Flag")
showMySchedulePortal Boolean? @map("ShowMySchedulePortal")
defaultMySchedulePanel Int? @map("Default_MySchedule_Panel")
warehouseBinRecId Int? @map("Warehouse_Bin_RecID")
warehouseBinFlag Boolean @map("Warehouse_Bin_Flag")
srLocationRecId Int? @map("SR_Location_RecID")
imageLink String? @map("Image_Link") @db.NVarChar(255)
countryRecId Int? @map("Country_RecID")
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime
lastLoginUtc DateTime? @map("Last_Login_UTC") @db.DateTime
mobileGpsFlag Boolean @map("Mobile_GPS_Flag")
descNewSize Int @map("DescNewSize")
analysisNewSize Int @map("AnalysisNewSize")
resolutionNewSize Int @map("ResolutionNewSize")
schedulingAutoStopwatch Boolean @map("Scheduling_Auto_Stopwatch")
schedulingAutoPopupQuickNotes Boolean @map("Scheduling_Auto_Popup_Quick_Notes")
partnerPortalFlag Boolean @map("Partner_Portal_Flag")
toastNotificationFlag Boolean @map("Toast_Notification_Flag")
office365Id String? @map("Office365_ID") @db.NVarChar(40)
pwLastUpdateUtc DateTime? @map("PW_Last_Update_UTC") @db.DateTime
useBrowserLanguageFlag Boolean @map("Use_Browser_Language_Flag")
memberGuid String @map("Member_Guid") @db.UniqueIdentifier
directionalSyncRecId Int @map("Directional_Sync_RecID")
useTelFlag Boolean? @map("Use_Tel_Flag")
useCalltoFlag Boolean? @map("Use_Callto_Flag")
id String @map("Id") @db.UniqueIdentifier
company Company? @relation(fields: [ownerLevelRecId], references: [companyRecId], onDelete: NoAction, onUpdate: NoAction, map: "Member_Company_fk")
warehouse Warehouse? @relation(fields: [warehouseRecId], references: [warehouseRecId], onDelete: NoAction, onUpdate: NoAction)
warehouseBin WarehouseBin? @relation(fields: [warehouseBinRecId], references: [warehouseBinRecId], onDelete: NoAction, onUpdate: NoAction)
ticketNotes TicketNote[]
approvedOpportunities Opportunity[] @relation("OpportunityApprovedBy")
rejectedOpportunities Opportunity[] @relation("OpportunityRejectedBy")
opportunityMembers OpportunityMember[] @relation("OpportunityMemberToMember")
@@map("Member")
@@schema("dbo")
}
// =====================
// OPPORTUNITY
// =====================
model Opportunity {
opportunityRecId Int @id @map("Opportunity_RecID")
opportunityName String @map("Opportunity_Name") @db.NVarChar(100)
companyRecId Int @map("Company_RecID")
contactRecId Int? @map("Contact_RecID")
soPipelineRecId Int @map("SO_Pipeline_RecID")
datePipelineChange DateTime? @map("Date_Pipeline_Change") @db.DateTime
soInterestRecId Int? @map("SO_Interest_RecID")
estimatedTotal Decimal? @map("Estimated_Total") @db.Decimal(18, 2)
probabilityToClose Int? @map("Probability_to_Close") @db.SmallInt
source String? @map("Source") @db.NVarChar(50)
dateBecameLead DateTime @map("Date_Became_Lead") @db.DateTime
dateCloseExpected DateTime @map("Date_Close_Expected") @db.Date
billingUnitRecId Int @map("Billing_Unit_RecID")
contractTypeRecId Int? @map("Contract_Type_RecID")
oldCloseFlag Boolean @map("old_Close_Flag")
dateClosed DateTime? @map("Date_Closed") @db.DateTime
closedBy String? @map("Closed_By") @db.NVarChar(15)
enteredBy String? @map("Entered_By") @db.NVarChar(15)
updatedBy String? @map("Updated_By") @db.NVarChar(15)
notes String? @map("Notes") @db.NVarChar(Max)
companyAddressRecId Int? @map("Company_Address_RecID")
redFlag Boolean @map("Red_Flag")
oldWonFlag Boolean @map("old_Won_Flag")
oldActualTotal Decimal? @map("old_Actual_Total") @db.Decimal(18, 2)
oldCompetitor String? @map("old_Competitor") @db.VarChar(50)
oldCloseNotes String? @map("old_Close_Notes") @db.VarChar(Max)
soOppStatusRecId Int @map("SO_Opp_Status_RecID")
pmProjectRecId Int? @map("PM_Project_RecID")
ownerLevelRecId Int @map("Owner_Level_RecID")
soTypeRecId Int? @map("SO_Type_RecID")
marketingCampaignRecId Int? @map("Marketing_Campaign_RecID")
agrTypeRecId Int? @map("AGR_Type_RecID")
srServiceRecId Int? @map("SR_Service_RecID")
soUrgencyRecId Int? @map("SO_Urgency_RecID")
approvedByRecId Int? @map("Approved_By")
dateApproved DateTime? @map("Date_Approved") @db.DateTime
notificationHistory String @map("Notification_History") @db.NVarChar(Max)
rejectedByRecId Int? @map("Rejected_By")
dateRejected DateTime? @map("Date_Rejected") @db.DateTime
mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier
poNumber String? @map("PO_Number") @db.NVarChar(25)
dateBecameLeadUtc DateTime @map("Date_Became_Lead_UTC") @db.DateTime
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime
dateClosedUtc DateTime? @map("Date_Closed_UTC") @db.DateTime
dateCloseExpectedUtc DateTime @map("Date_Close_Expected_UTC") @db.Date
shipToCompanyRecId Int? @map("Ship_To_Company_RecID")
shipToContactRecId Int? @map("Ship_To_Contact_RecID")
shipToCompanyAddressRecId Int? @map("Ship_To_Company_Address_RecID")
billToCompanyRecId Int? @map("Bill_To_Company_RecID")
billToContactRecId Int? @map("Bill_To_Contact_RecID")
billToCompanyAddressRecId Int? @map("Bill_To_Company_Address_RecID")
billingTermsRecId Int? @map("Billing_Terms_RecID")
taxCodeRecId Int? @map("Tax_Code_RecID")
taxTotal Decimal @map("Tax_Total") @db.Decimal(18, 2)
currencyRecId Int @map("Currency_RecID")
techContactRecId Int? @map("Tech_Contact_RecID")
id String? @map("Id") @db.UniqueIdentifier
company Company @relation(fields: [companyRecId], references: [companyRecId], onDelete: NoAction, onUpdate: NoAction)
contact Contact? @relation("OpportunityContact", fields: [contactRecId], references: [contactRecId], onDelete: NoAction, onUpdate: NoAction)
soPipeline SoPipeline @relation(fields: [soPipelineRecId], references: [soPipelineRecId], onDelete: NoAction, onUpdate: NoAction)
soInterest SoInterest? @relation(fields: [soInterestRecId], references: [soInterestRecId], onDelete: NoAction, onUpdate: NoAction)
billingUnit BillingUnit @relation(fields: [billingUnitRecId], references: [billingUnitRecId], onDelete: NoAction, onUpdate: NoAction)
contractType ContractType? @relation(fields: [contractTypeRecId], references: [contractTypeRecId], onDelete: NoAction, onUpdate: NoAction)
companyAddress CompanyAddress? @relation("OpportunityAddress", fields: [companyAddressRecId], references: [companyAddressRecId], onDelete: NoAction, onUpdate: NoAction)
soOppStatus SoOppStatus @relation(fields: [soOppStatusRecId], references: [soOppStatusRecId], onDelete: NoAction, onUpdate: NoAction)
pmProject PmProject? @relation(fields: [pmProjectRecId], references: [pmProjectRecId], onDelete: NoAction, onUpdate: NoAction)
ownerLevel OwnerLevel @relation(fields: [ownerLevelRecId], references: [ownerLevelRecId], onDelete: NoAction, onUpdate: NoAction)
soType SoType? @relation(fields: [soTypeRecId], references: [soTypeRecId], onDelete: NoAction, onUpdate: NoAction)
marketingCampaign MarketingCampaign? @relation(fields: [marketingCampaignRecId], references: [marketingCampaignRecId], onDelete: NoAction, onUpdate: NoAction)
agrType AgrType? @relation(fields: [agrTypeRecId], references: [agrTypeRecId], onDelete: NoAction, onUpdate: NoAction)
srService SrService? @relation(fields: [srServiceRecId], references: [srServiceRecId], onDelete: NoAction, onUpdate: NoAction)
soUrgency SoUrgency? @relation(fields: [soUrgencyRecId], references: [soUrgencyRecId], onDelete: NoAction, onUpdate: NoAction)
approvedByMember Member? @relation("OpportunityApprovedBy", fields: [approvedByRecId], references: [memberRecId], onDelete: NoAction, onUpdate: NoAction)
rejectedByMember Member? @relation("OpportunityRejectedBy", fields: [rejectedByRecId], references: [memberRecId], onDelete: NoAction, onUpdate: NoAction)
billingTerms BillingTerms? @relation(fields: [billingTermsRecId], references: [billingTermsRecId], onDelete: NoAction, onUpdate: NoAction)
taxCode TaxCode? @relation(fields: [taxCodeRecId], references: [taxCodeRecId], onDelete: NoAction, onUpdate: NoAction)
currency Currency @relation(fields: [currencyRecId], references: [currencyRecId], onDelete: NoAction, onUpdate: NoAction)
// Reverse relations (one-to-many from Opportunity)
activities SoActivity[]
customValues V_RptOpportunityCustomFields[]
opportunityNotes SoNote[]
forecastItems SoForecastDtl[]
ivProducts IV_Product[]
contacts SoInfluencer[]
members OpportunityMember[] @relation("OpportunityMemberToOpportunity")
@@map("SO_Opportunity")
@@schema("dbo")
}
// =====================
// REFERENCE TABLES
// =====================
model SoPipeline {
soPipelineRecId Int @id @map("SO_Pipeline_RecID")
seqNbr Int? @map("Seq_Nbr")
description String? @map("Description") @db.NVarChar(50)
funnelColor String? @map("Funnel_Color") @db.NVarChar(25)
surveyRecId Int? @map("Survey_RecID")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
soProbabilityRecId Int @map("SO_Probability_RecID")
lastUpdatedUtc 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
opportunities Opportunity[]
@@map("SO_Pipeline")
@@schema("dbo")
}
model SoOppStatus {
soOppStatusRecId Int @id @map("SO_Opp_Status_RecID")
description String? @map("Description") @db.NVarChar(30)
wonFlag Boolean @map("Won_Flag")
lostFlag Boolean @map("Lost_Flag")
closedFlag Boolean @map("Closed_Flag")
inactiveFlag Boolean @map("Inactive_Flag")
defaultFlag Boolean @map("Default_Flag")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
lastUpdatedUtc 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
opportunities Opportunity[]
ivProducts IV_Product[]
@@map("SO_Opp_Status")
@@schema("dbo")
}
model SoType {
soTypeRecId Int @id @map("SO_Type_RecID")
description String? @map("Description") @db.NVarChar(50)
updatedBy String? @map("Update_By") @db.NVarChar(50)
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
inactiveFlag Boolean @map("Inactive_Flag")
id String @map("Id") @db.UniqueIdentifier
opportunities Opportunity[]
@@map("SO_Type")
@@schema("dbo")
}
model SoUrgency {
soUrgencyRecId Int @id @map("SO_Urgency_RecID")
imageLink String? @map("Image_Link") @db.NVarChar(100)
description String @map("Description") @db.NVarChar(50)
sortOrder Int? @map("Sort_Order")
defaultFlag Boolean @map("Default_Flag")
opportunities Opportunity[]
@@map("SO_Urgency")
@@schema("dbo")
}
model SoInterest {
soInterestRecId Int @id @map("SO_Interest_RecID")
description String? @map("Description") @db.NVarChar(50)
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
sortOrder Int? @map("Sort_Order") @db.SmallInt
lastUpdatedUtc 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
opportunities Opportunity[]
@@map("SO_Interest")
@@schema("dbo")
}
model OwnerLevel {
ownerLevelRecId Int @id @map("Owner_Level_RecID")
ownerLevelId Int @map("Owner_Level_ID") @db.SmallInt
ownerLevelName String? @map("Owner_Level_Name") @db.NVarChar(50)
description String? @map("Description") @db.NVarChar(50)
memberId String? @map("Member_ID") @db.NVarChar(15)
notifyFlag Boolean @map("Notify_Flag")
reportsToRecId Int? @map("Reports_To_RecID")
salesTerritoryFlag Boolean @map("Sales_Territory_Flag")
lastUpdate DateTime @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(15)
xrefId String? @map("Xref_ID") @db.NVarChar(10)
locationFlag Boolean? @map("Location_Flag")
salesRepId String? @map("SalesRep_ID") @db.NVarChar(50)
olAddressLine1 String? @map("OL_Address_Line1") @db.NVarChar(50)
olAddressLine2 String? @map("OL_Address_Line2") @db.NVarChar(50)
olCity String? @map("OL_City") @db.NVarChar(50)
olStateId String? @map("OL_State_ID") @db.NVarChar(50)
olZip String? @map("OL_Zip") @db.NVarChar(12)
olPhoneNbr String? @map("OL_PhoneNbr") @db.NVarChar(15)
olPhoneNbrFax String? @map("OL_Phonenbr_Fax") @db.NVarChar(15)
clientFlag Boolean @map("client_flag")
owaLink String? @map("OWA_Link") @db.NVarChar(100)
olCountryRecId Int? @map("OL_Country_RecID")
timeZoneRecId Int? @map("time_zone_recid")
officeCalendarRecId Int? @map("Office_Calendar_RecID")
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
avaValidatedFlag Boolean @map("Ava_Validated_Flag")
coreEntityId String? @map("Core_Entity_ID") @db.UniqueIdentifier
coreEntityUpdatedBy String? @map("Core_Entity_Updated_By") @db.NVarChar(15)
coreEntityLastUpdateUtc DateTime? @map("Core_Entity_Last_Update_UTC") @db.DateTime2
id String @map("Id") @db.UniqueIdentifier
opportunities Opportunity[]
ivProducts IV_Product[]
@@map("Owner_Level")
@@schema("dbo")
}
model Department {
departmentRecId Int @id @map("Department_RecID")
departmentName String? @map("Department_Name") @db.NVarChar(30)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(30)
lastUpdatedUTC 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
contacts Contact[] @relation("ContactDepartment")
@@map("Department")
@@schema("dbo")
}
model Contact {
contactRecId Int @id @map("Contact_RecID")
companyRecId Int? @map("Company_RecID")
memberId String? @map("Member_ID") @db.NVarChar(15)
companyName String? @map("Company_Name") @db.NVarChar(50)
seqNbr Int? @map("Seq_Nbr")
firstName String? @map("First_Name") @db.NVarChar(50)
lastName String? @map("Last_Name") @db.NVarChar(50)
title String? @map("Title") @db.NVarChar(128)
relationship String? @map("Relationship") @db.NVarChar(50)
defaultFlag Boolean? @map("Default_Flag")
exchangeFlag Boolean? @map("Exchange_Flag")
lastUpdate DateTime @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(15)
relationshipRecId Int? @map("Relationship_RecID")
contactStatusRecId Int? @map("Contact_Status_RecID")
gender String? @map("Gender") @db.Char(1)
nickName String? @map("NickName") @db.NVarChar(30)
dateBirth DateTime? @map("Date_Birth") @db.DateTime2
marriedFlag Boolean @map("Married_Flag")
spouseName String? @map("Spouse_Name") @db.NVarChar(30)
dateAnniversary DateTime? @map("Date_Anniversary") @db.DateTime2
childrenFlag Boolean @map("Children_Flag")
childrenInfo String? @map("Children_Info") @db.NVarChar(Max)
school String? @map("School") @db.NVarChar(50)
hobbies String? @map("Hobbies") @db.NVarChar(Max)
reportsToRecId Int? @map("Reports_To_RecID")
assistantRecId Int? @map("Assistant_RecID")
userfield1 String? @map("Userfield1") @db.NVarChar(50)
userfield2 String? @map("Userfield2") @db.NVarChar(50)
userfield3 String? @map("Userfield3") @db.NVarChar(50)
userfield4 String? @map("Userfield4") @db.NVarChar(50)
userfield5 String? @map("Userfield5") @db.NVarChar(50)
userfield6 String? @map("Userfield6") @db.NVarChar(50)
userfield7 String? @map("Userfield7") @db.NVarChar(50)
userfield8 String? @map("Userfield8") @db.NVarChar(50)
userfield9 String? @map("Userfield9") @db.NVarChar(50)
userfield10 String? @map("Userfield10") @db.NVarChar(50)
reportsToName String? @map("Reports_To_Name") @db.NVarChar(101)
assistantName String? @map("Assistant_Name") @db.NVarChar(101)
companyAddressRecId Int? @map("Company_Address_RecID")
personalAddressFlag Boolean @map("Personal_Address_Flag")
addressLine1 String? @map("Address_Line1") @db.NVarChar(50)
addressLine2 String? @map("Address_Line2") @db.NVarChar(50)
city String? @map("City") @db.NVarChar(50)
stateId String? @map("State_ID") @db.NVarChar(50)
zip String? @map("Zip") @db.NVarChar(12)
country String? @map("Country") @db.NVarChar(50)
defaultBillingFlag Boolean @map("Default_Billing_Flag")
exchangeGuid String? @map("exchange_guid") @db.NVarChar(200)
adminFlag Boolean? @map("Admin_Flag")
dateEntered DateTime @map("Date_Entered") @db.DateTime2
exchangeHref String? @map("Exchange_Href") @db.NVarChar(500)
unsubscribeFlag Boolean @map("Unsubscribe_Flag")
inactiveFlag Boolean? @map("Inactive_Flag")
imageLink String? @map("Image_Link") @db.NVarChar(255)
mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier
sid String? @map("SID") @db.NVarChar(184)
departmentRecId Int? @map("Department_RecID")
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
enteredBy String? @map("Entered_By") @db.NVarChar(15)
defaultPhoneNbr String? @map("Default_PhoneNbr") @db.NVarChar(30)
defaultPhoneExtension String? @map("Default_PhoneExtension") @db.NVarChar(15)
defaultPhoneType String? @map("Default_Phone_Type") @db.NVarChar(30)
coreEntityContactId String? @map("Core_Entity_Contact_ID") @db.NVarChar(36)
lastUpdateUtcCesContact DateTime? @map("Last_Update_UTC_CES_Contact") @db.DateTime2
updatedByCesContact String? @map("Updated_By_CES_Contact") @db.NVarChar(15)
nonSyncFlag Boolean @map("Non_Sync_Flag")
coreEntityReferenceId String? @map("Core_Entity_Reference_ID") @db.NVarChar(36)
m365ContactSyncFlag Boolean @map("M365_Contact_Sync_Flag")
id String? @map("Id") @db.UniqueIdentifier
opportunities Opportunity[] @relation("OpportunityContact")
ticketNotes TicketNote[]
department Department? @relation("ContactDepartment", fields: [departmentRecId], references: [departmentRecId])
@@map("Contact")
@@schema("dbo")
}
model CompanyAddress {
companyAddressRecId Int @id @map("Company_Address_RecID")
companyRecId Int @map("Company_RecID")
companyName String? @map("Company_Name") @db.NVarChar(50)
addressLine1 String? @map("Address_Line1") @db.NVarChar(50)
addressLine2 String? @map("Address_Line2") @db.NVarChar(50)
city String? @map("City") @db.NVarChar(50)
stateId String? @map("State_ID") @db.NVarChar(50)
zip String? @map("Zip") @db.NVarChar(12)
phoneNbr String? @map("PhoneNbr") @db.NVarChar(30)
phoneNbrFax String? @map("PhoneNbr_Fax") @db.NVarChar(30)
defaultFlag Boolean @map("Default_Flag")
defaultMailFlag Boolean @map("Default_Mail_Flag")
defaultShipFlag Boolean @map("Default_Ship_Flag")
defaultBillFlag Boolean @map("Default_Bill_Flag")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
description String? @map("Description") @db.NVarChar(50)
taxCodeRecId Int? @map("tax_code_recid")
exReimb Decimal? @map("EX_Reimb") @db.Decimal(18, 2)
inactiveFlag Boolean @map("Inactive_Flag")
countryRecId Int? @map("Country_RecID")
officeCalendarRecId Int? @map("Office_Calendar_RecID")
timeZoneRecId Int? @map("Time_Zone_RecID")
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
enteredBy String @map("Entered_By") @db.NVarChar(15)
avaValidatedFlag Boolean @map("Ava_Validated_Flag")
mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier
customerUsageTypeRecId Int? @map("Customer_Usage_Type_RecID")
billSeparateFlag Boolean @map("Bill_Separate_Flag")
coreEntitySiteId String? @map("Core_Entity_Site_ID") @db.NVarChar(36)
lastUpdateUtcCesAddress DateTime @map("Last_Update_UTC_CES_Address") @db.DateTime2
updatedByCesAddress String @map("Updated_By_CES_Address") @db.NVarChar(15)
lastUpdateUtcCesPhone DateTime @map("Last_Update_UTC_CES_Phone") @db.DateTime2
updatedByCesPhone String @map("Updated_By_CES_Phone") @db.NVarChar(15)
phoneNbrExt String? @map("PhoneNbrExt") @db.NVarChar(15)
lastUpdateUtcCesSite DateTime? @map("Last_Update_UTC_CES_Site") @db.DateTime
updatedByCesSite String? @map("Updated_By_CES_Site") @db.NVarChar(15)
id String? @map("Id") @db.UniqueIdentifier
opportunities Opportunity[] @relation("OpportunityAddress")
@@map("Company_Address")
@@schema("dbo")
}
// =====================
// CONFIGURATION
// =====================
model Configuration {
configRecId Int @id @map("Config_RecID")
csSurveyRecId Int @map("CS_Survey_RecID")
configName String? @map("Config_Name") @db.NVarChar(100)
mfgCompanyRecId Int? @map("Mfg_Company_RecID")
serialNumber String? @map("Serial_Number") @db.NVarChar(Max)
datePurchased DateTime? @map("Date_Purchased") @db.DateTime
dateInstalled DateTime? @map("Date_Installed") @db.DateTime
installedBy Int? @map("Installed_By")
dateExpiration DateTime? @map("Date_Expiration") @db.DateTime
companyRecId Int @map("Company_RecID")
contactRecId Int? @map("Contact_RecID")
companyAddressRecId Int? @map("Company_Address_RecID")
ownerLevelRecId Int? @map("Owner_Level_RecID")
billingUnitRecId Int? @map("Billing_Unit_RecID")
contractRecId Int? @map("Contract_RecID")
notes String? @map("Notes") @db.NVarChar(Max)
lastUpdate DateTime? @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(15)
modelNumber String? @map("Model_Number") @db.NVarChar(50)
tagNumber String? @map("Tag_Number") @db.NVarChar(50)
notificationHistory String? @map("Notification_History") @db.VarChar(Max)
configStatusRecId Int? @map("Config_Status_RecID")
deviceId String? @map("Device_ID") @db.NVarChar(100)
mgmtLink String? @map("Mgmt_Link") @db.NVarChar(1000)
lastLogin String? @map("Last_Login") @db.NVarChar(100)
mspLastUpdatedBy String? @map("Msp_Last_Updated_By") @db.NVarChar(50)
mspLastUpdated DateTime? @map("Msp_Last_Updated") @db.DateTime
mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier
parentRecId Int? @map("Parent_RecID")
billFlag Boolean @map("Bill_Flag")
backupSuccesses Int? @map("Backup_Successes")
backupIncomplete Int? @map("Backup_Incomplete")
backupFailed Int? @map("Backup_Failed")
backupRestores Int? @map("Backup_Restores")
backupLastBackupDate DateTime? @map("Backup_Last_Backup_Date") @db.DateTime
backupServerName String? @map("Backup_Server_Name") @db.NVarChar(50)
backupBillableSpaceGb Decimal? @map("Backup_Billable_Space_Gb") @db.Decimal(18, 2)
backupProtectedDeviceList String? @map("Backup_Protected_Device_List") @db.NVarChar(Max)
backupYear Int? @map("Backup_Year")
backupMonth Int? @map("Backup_Month")
macAddress String? @map("MAC_Address") @db.NVarChar(25)
customField String? @map("Custom_Field") @db.NVarChar(Max)
ipAddress String? @map("IP_Address") @db.NVarChar(50)
defaultGateway String? @map("Default_Gateway") @db.NVarChar(50)
osType String? @map("Os_Type") @db.NVarChar(250)
osInfo String? @map("Os_Info") @db.NVarChar(250)
cpuSpeed String? @map("Cpu_Speed") @db.NVarChar(100)
ram String? @map("RAM") @db.NVarChar(25)
localHardDrives String? @map("Local_Hard_Drives") @db.NVarChar(Max)
manufacturerRecId Int? @map("Manufacturer_RecID")
srSlaRecId Int? @map("SR_SLA_RecID")
remoteLink String? @map("Remote_Link") @db.NVarChar(1000)
lastUpdatedUTC DateTime @map("Last_Update_UTC") @db.DateTime2
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
enteredBy String @map("Entered_By") @db.NVarChar(15)
ivProductRecId Int? @map("IV_Product_RecID")
incompleteFlag Boolean @map("Incomplete_Flag")
conversionSource String? @map("Conversion_Source") @db.NVarChar(15)
showRemoteFlag Boolean @map("Show_Remote_Flag")
showAutomateFlag Boolean @map("Show_Automate_Flag")
needsRenewal Boolean @map("Needs_Renewal")
manufacturerPartNumber String? @map("Manufacturer_Part_Number") @db.NVarChar(50)
id String @map("Id") @db.UniqueIdentifier
configStatus ConfigurationStatus? @relation(fields: [configStatusRecId], references: [configStatusRecId], onDelete: NoAction, onUpdate: NoAction)
configurationAudits ConfigurationAudit[]
@@map("Config")
@@schema("dbo")
}
model ConfigurationStatus {
configStatusRecId Int @id @map("Config_Status_RecID")
description String? @map("Description") @db.NVarChar(50)
closedFlag Boolean? @map("Closed_Flag")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
defaultFlag Boolean? @map("Default_Flag")
lastUpdatedUTC 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
configurations Configuration[]
@@map("Config_Status")
@@schema("dbo")
}
model ConfigurationAudit {
configurationAuditRecId Int @id @map("Configuration_Audit_RecId")
configurationRecId Int @map("Configuration_RecId")
localeKeyRecId Int? @map("Locale_Key_RecId")
auditSourceRecId Int @map("Audit_Source_RecId") @db.SmallInt
auditTypeRecId Int @map("Audit_Type_RecId") @db.SmallInt
updatedBy String @map("Updated_by") @db.NVarChar(15)
lastUpdatedUtc DateTime @map("Last_Updated_utc") @db.DateTime2
configuration Configuration @relation(fields: [configurationRecId], references: [configRecId], onDelete: NoAction, onUpdate: NoAction)
configurationValues ConfigurationAuditValue[]
@@map("Configuration_Audit")
@@schema("dbo")
}
model ConfigurationAuditValue {
configurationAuditValueRecId Int @id @map("Configuration_Audit_Value_RecID")
auditToken String @map("Audit_Token") @db.NVarChar(2000)
auditValueRecId Int? @map("Audit_Value_RecID")
auditValue String @map("Audit_Value") @db.NVarChar(Max)
configurationAuditRecId Int @map("Configuration_Audit_RecID")
localeKeyRecId Int? @map("Locale_Key_RecID")
configurationAudit ConfigurationAudit @relation(fields: [configurationAuditRecId], references: [configurationAuditRecId], onDelete: NoAction, onUpdate: NoAction)
@@map("Configuration_Audit_Value")
@@schema("dbo")
}
model BillingTerms {
billingTermsRecId Int @id @map("Billing_Terms_RecID")
description String? @map("Description") @db.NVarChar(50)
defaultFlag Boolean @map("Default_Flag")
updatedBy String @map("Updated_By") @db.NVarChar(15)
dueDays Int? @map("Due_Days")
termsXref String? @map("Terms_Xref") @db.NVarChar(50)
lastUpdatedUtc 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
opportunities Opportunity[]
@@map("Billing_Terms")
@@schema("dbo")
}
model TaxCode {
taxCodeRecId Int @id @map("Tax_Code_RecID")
taxCodeId String? @map("Tax_Code_ID") @db.NVarChar(8)
description String? @map("Description") @db.NVarChar(50)
defaultFlag Boolean @map("Default_Flag")
lastUpdate DateTime @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(15)
countryRecId Int? @map("Country_RecID")
piggyBackFlag Boolean? @map("PiggyBack_Flag")
dateEffective DateTime? @map("Date_Effective") @db.Date
displayDetailFlag Boolean? @map("DisplayDetail_Flag")
codeCaption String? @map("CodeCaption") @db.NVarChar(25)
dateCancel DateTime? @map("Date_Cancel") @db.Date
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
enteredBy String @map("Entered_By") @db.NVarChar(15)
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
coreEntityUpdatedBy String @map("Core_Entity_Updated_By") @db.NVarChar(15)
coreEntityLastUpdateUtc DateTime @map("Core_Entity_Last_Update_UTC") @db.DateTime2
coreEntityId String? @map("Core_Entity_ID") @db.UniqueIdentifier
id String @map("Id") @db.UniqueIdentifier
opportunities Opportunity[]
levels TaxCodeLevel[]
@@map("Tax_Code")
@@schema("dbo")
}
model TaxCodeLevel {
taxCodeLevelRecId Int @id @map("Tax_Code_Level_RecID")
taxCodeRecId Int @map("Tax_Code_RecID")
taxRate Decimal @map("Tax_Rate") @db.Decimal(18, 6)
taxRateType String @map("Tax_Rate_Type") @db.Char(1)
taxMax Decimal? @map("Tax_Max") @db.Decimal(18, 6)
taxXref String? @map("Tax_Xref") @db.NVarChar(50)
agencyXref String? @map("Agency_Xref") @db.NVarChar(100)
levelCaption String? @map("Level_Caption") @db.NVarChar(25)
taxServices Boolean @map("Tax_Services")
taxExpenses Boolean @map("Tax_Expenses")
taxProducts Boolean @map("Tax_Products")
singleUnit Int @map("Single_Unit")
singleUnitMinimum Decimal? @map("Single_Unit_Minimum") @db.Decimal(18, 6)
singleUnitMaximum Decimal? @map("Single_Unit_Maximum") @db.Decimal(18, 6)
enteredBy String @map("Entered_By") @db.NVarChar(15)
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
updatedBy String @map("Updated_By") @db.NVarChar(15)
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
coreEntityUpdatedBy String @map("Core_Entity_Updated_By") @db.NVarChar(15)
coreEntityLastUpdateUtc DateTime? @map("Core_Entity_Last_Update_UTC") @db.DateTime2
coreEntityId String? @map("Core_Entity_ID") @db.UniqueIdentifier
taxCode TaxCode @relation(fields: [taxCodeRecId], references: [taxCodeRecId], onDelete: NoAction, onUpdate: NoAction)
@@map("Tax_Code_Level")
@@schema("dbo")
}
model Currency {
currencyRecId Int @id @map("Currency_RecID")
currencyId String @map("Currency_ID") @db.NVarChar(10)
description String? @map("Description") @db.NVarChar(50)
currencySymbol String? @map("Currency_Symbol") @db.NVarChar(10)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(15)
displayIdFlag Boolean @map("DisplayID_Flag")
displaySymbolFlag Boolean @map("DisplaySymbol_Flag")
isoCode String? @map("Iso_Code") @db.NVarChar(3)
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
enteredBy String @map("Entered_By") @db.NVarChar(15)
locale String? @map("Locale") @db.NVarChar(15)
thousandsSeparator String @map("Thousands_Separator") @db.NVarChar(10)
decimalSeparator String @map("Decimal_Separator") @db.NVarChar(10)
useParenthesesFlag Boolean @map("Use_Parentheses_Flag")
numDecimals Int @map("Num_Decimals") @db.TinyInt
rightAlignFlag Boolean @map("Right_Align_Flag")
updatedFlag Boolean @map("Updated_Flag")
id String @map("Id") @db.UniqueIdentifier
opportunities Opportunity[]
@@map("Currency")
@@schema("dbo")
}
model BillingUnit {
billingUnitRecId Int @id @map("Billing_Unit_RecID")
billingUnitId String @map("Billing_Unit_ID") @db.NVarChar(15)
description String? @map("Description") @db.NVarChar(50)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(15)
boardIcon String? @map("Board_Icon") @db.NVarChar(100)
serviceFlag Boolean? @map("service_flag")
noServiceFlag Boolean? @map("NoService_Flag")
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
id String @map("Id") @db.UniqueIdentifier
opportunities Opportunity[]
ivProducts IV_Product[]
@@map("Billing_Unit")
@@schema("dbo")
}
model ContractType {
contractTypeRecId Int @id @map("Contract_Type_RecID")
contractTypeId String? @map("Contract_Type_ID") @db.NVarChar(20)
description String @map("Description") @db.NVarChar(50)
defaultFlag Boolean @map("Default_Flag")
lastUpdate DateTime? @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(15)
monthlyRate Decimal? @map("Monthly_Rate") @db.Decimal(18, 2)
maxLengthMonths Int? @map("Max_Length_Months") @db.SmallInt
srUrgencyRecId Int? @map("SR_Urgency_RecID")
opportunities Opportunity[]
@@map("Contract_Type")
@@schema("dbo")
}
model PmProject {
pmProjectRecId Int @id @map("PM_Project_RecID")
companyRecId Int @map("Company_RecID")
projectId String @map("Project_ID") @db.NVarChar(100)
memberId String @map("Member_ID") @db.NVarChar(15)
notes String? @map("Notes") @db.NVarChar(Max)
dateStart DateTime @map("Date_Start") @db.Date
dateReq DateTime @map("Date_Req") @db.Date
closedBy String? @map("Closed_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(15)
contactRecId Int? @map("contact_recid")
companyAddressRecId Int? @map("company_address_recid")
downpayment Decimal @map("Downpayment") @db.Decimal(18, 2)
billingAmount Decimal @map("Billing_Amount") @db.Decimal(18, 2)
pmBillingMethodId String @map("PM_Billing_Method_ID") @db.Char(1)
billingUnitRecId Int @map("Billing_Unit_RecID")
billableFlag Boolean @map("Billable_Flag")
estRevenue Decimal @map("Est_Revenue") @db.Decimal(18, 2)
billingReference String? @map("Billing_Reference") @db.NVarChar(50)
pmTypeRecId Int? @map("PM_Type_RecID")
pmStatusRecId Int @map("PM_Status_RecID")
ownerLevelRecId Int @map("Owner_Level_RecID")
opportunityRecId Int? @map("Opportunity_RecID")
estHours Decimal? @map("Est_Hours") @db.Decimal(18, 2)
budgetFlag Boolean @map("Budget_Flag")
timeApproverId String? @map("Time_Approver_ID") @db.NVarChar(15)
expApproverId String? @map("Exp_Approver_ID") @db.NVarChar(15)
billingCompanyRecId Int? @map("Billing_Company_RecID")
billingAddressRecId Int? @map("Billing_Address_RecID")
billingContactRecId Int? @map("Billing_Contact_RecID")
billingAttention String? @map("Billing_Attention") @db.NVarChar(50)
expBillableFlag Boolean @map("Exp_Billable_Flag")
poAmount Decimal? @map("PO_Amount") @db.Decimal(18, 2)
restrictDpFlag Boolean @map("restrict_dp_flag")
billCompleteFlag Boolean @map("BillComplete_Flag")
invoiceFlag Boolean @map("Invoice_Flag")
expInvoiceFlag Boolean @map("Exp_Invoice_Flag")
prodInvoiceFlag Boolean @map("Prod_Invoice_Flag")
prodBillableFlag Boolean @map("Prod_Billable_Flag")
overrideFlag Boolean @map("Override_Flag")
agrHeaderRecId Int? @map("AGR_Header_RecID")
agrAmount Decimal @map("AGR_Amount") @db.Decimal(18, 2)
agrMonth Int? @map("AGR_Month") @db.SmallInt
agrYear Int? @map("AGR_Year") @db.SmallInt
billUnAppFlag Boolean @map("BillUnApp_Flag")
srBoardRecId Int @map("SR_Board_RecID")
orderHeaderRecId Int? @map("Order_Header_RecID")
notificationHistory String @map("Notification_History") @db.NVarChar(Max)
portalFlag Boolean @map("Portal_Flag")
billingStartUtc DateTime? @map("Billing_Start_UTC") @db.DateTime2
estTimeCost Decimal @map("Est_Time_Cost") @db.Decimal(18, 2)
estProductCost Decimal @map("Est_Product_Cost") @db.Decimal(18, 2)
estExpenseCost Decimal @map("Est_Expense_Cost") @db.Decimal(18, 2)
estProductRevenue Decimal @map("Est_Product_Revenue") @db.Decimal(18, 2)
estExpenseRevenue Decimal @map("Est_Expense_Revenue") @db.Decimal(18, 2)
billingRateType String @map("Billing_Rate_Type") @db.NVarChar(15)
budgetAnalysisRecId Int @map("Budget_Analysis_RecID")
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
dateClosedUtc DateTime? @map("Date_Closed_UTC") @db.DateTime2
createdBy String @map("Created_By") @db.NVarChar(20)
showDependencies Boolean @map("Show_Dependencies")
showEstimates Boolean @map("Show_Estimates")
shippingCompanyRecId Int? @map("Shipping_Company_RecID")
shippingAddressRecId Int? @map("Shipping_Address_RecID")
shippingContactRecId Int? @map("Shipping_Contact_RecID")
billingTermsRecId Int? @map("Billing_Terms_RecID")
taxCodeRecId Int? @map("Tax_Code_RecID")
currencyRecId Int @map("Currency_RecID")
percentComplete Decimal? @map("Percent_Complete") @db.Decimal(5, 4)
overridePercentComplete Boolean @map("Override_Percent_Complete")
id String? @map("Id") @db.UniqueIdentifier
billingLogRecId Int? @map("Billing_Log_RecID")
opportunities Opportunity[]
ivProducts IV_Product[] @relation("IVProductProject")
convertedIvProducts IV_Product[] @relation("IVProductConvertedProject")
@@map("PM_Project")
@@schema("dbo")
}
model MarketingCampaign {
marketingCampaignRecId Int @id @map("Marketing_Campaign_RecID")
marketingId String @map("Marketing_ID") @db.NVarChar(50)
inactiveFlag Boolean @map("Inactive_Flag")
lastUpdate DateTime @map("Last_Update") @db.DateTime
updatedBy String @map("Updated_By") @db.NVarChar(15)
campaignSubtypeRecId Int @map("Campaign_Subtype_RecID")
campaignStatusRecId Int @map("Campaign_Status_RecID")
dateStart DateTime? @map("Date_Start") @db.DateTime
dateEnd DateTime? @map("Date_End") @db.DateTime
ownerLevelRecId Int? @map("Owner_Level_RecID")
memberRecId Int? @map("Member_RecID")
dateCancel DateTime? @map("Date_Cancel") @db.DateTime
cancelDays Int? @map("Cancel_Days")
cancelType String? @map("Cancel_Type") @db.Char(1)
notes String? @map("Notes") @db.NVarChar(Max)
budgetRevenue Decimal @map("Budget_Revenue") @db.Decimal(18, 2)
budgetCost Decimal @map("Budget_Cost") @db.Decimal(18, 2)
actualCost Decimal @map("Actual_Cost") @db.Decimal(18, 2)
groupTypeRecId Int? @map("Group_Type_RecID")
wfTrackHeaderRecId Int? @map("WF_Track_Header_RecID")
wfOppTrackHeaderRecId Int? @map("WF_Opp_Track_Header_RecID")
impressions Int @map("Impressions")
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime
billingUnitRecId Int? @map("Billing_Unit_RecID")
enteredBy String @map("Entered_By") @db.NVarChar(15)
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime
id String @map("Id") @db.UniqueIdentifier
opportunities Opportunity[]
@@map("Marketing_Campaign")
@@schema("dbo")
}
model AgrType {
agrTypeRecId Int @id @map("AGR_Type_RecID")
agrTypeDesc String? @map("AGR_Type_Desc") @db.NVarChar(50)
agrInactiveFlag Boolean @map("AGR_Inactive_Flag")
srUrgencyRecId Int? @map("SR_Urgency_RecID")
agrDetailTypeRecId Int? @map("AGR_Detail_Type_RecID")
billCycleRecId Int? @map("Bill_Cycle_RecID")
invoiceDesc String? @map("Invoice_Desc") @db.NVarChar(4000)
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
billAmount Decimal? @map("Bill_Amount") @db.Decimal(18, 2)
oneTimeFlag Boolean @map("OneTime_Flag")
ownerLevelRecId Int? @map("Owner_Level_RecID")
billingUnitRecId Int? @map("Billing_Unit_RecID")
olRestrictFlag Boolean @map("OL_Restrict_Flag")
buRestrictFlag Boolean @map("BU_Restrict_Flag")
activityClassRecId Int? @map("Activity_Class_RecID")
activityTypeRecId Int? @map("Activity_Type_RecID")
topCommentFlag Boolean @map("TopComment_Flag")
bottomCommentFlag Boolean @map("BottomComment_Flag")
teInvCustFlag Boolean @map("TE_InvCust_Flag")
exInvCustFlag Boolean @map("EX_InvCust_Flag")
ivInvCustFlag Boolean @map("IV_InvCust_Flag")
teBillableFlag Boolean @map("TE_Billable_Flag")
teInvoiceFlag Boolean @map("TE_Invoice_Flag")
exBillableFlag Boolean @map("EX_Billable_Flag")
exInvoiceFlag Boolean @map("EX_Invoice_Flag")
ivBillableFlag Boolean @map("IV_Billable_Flag")
ivInvoiceFlag Boolean @map("IV_Invoice_Flag")
taxableFlag Boolean @map("Taxable_Flag")
teAmount Decimal? @map("TE_Amount") @db.Decimal(18, 2)
agrDefaultFlag Boolean @map("AGR_Default_Flag")
ppAmount Decimal? @map("PP_Amount") @db.Decimal(18, 2)
ppUnlimitedFlag Boolean @map("PP_Unlimited_Flag")
ppOneTimeFlag Boolean @map("PP_One_Time_Flag")
appCycleId String? @map("AppCycle_ID") @db.Char(1)
ppTimeFlag Boolean @map("PP_Time_Flag")
ppExpensesFlag Boolean @map("PP_Expenses_Flag")
ppProductsFlag Boolean @map("PP_Products_Flag")
ppExpireFlag Boolean @map("PP_Expire_Flag")
ppCarryoverFlag Boolean @map("PP_Carryover_Flag")
carryoverDays Int? @map("Carryover_Days")
overrunFlag Boolean @map("Overrun_Flag")
overrunLimit Int? @map("Overrun_Limit")
prepayFlag Boolean @map("Prepay_Flag")
preSufFlag Boolean @map("PreSuf_Flag")
invoicePreSuf String? @map("Invoice_PreSuf") @db.NVarChar(5)
restrictDpFlag Boolean @map("Restrict_DP_Flag")
billingTermsRecId Int? @map("Billing_Terms_RecID")
srSlaRecId Int? @map("SR_SLA_RecID")
chargeFirmFlag Boolean @map("Charge_Firm_Flag")
cycleBasisId String? @map("CycleBasis_ID") @db.Char(1)
ppTaxFlag Boolean @map("PP_Tax_Flag")
pmTypeRecId Int? @map("PM_Type_RecID")
compRateOption String? @map("Comp_Rate_Option") @db.Char(1)
compRateAmount Decimal? @map("Comp_Rate_Amount") @db.Decimal(18, 2)
compLimitOption String? @map("Comp_Limit_Option") @db.Char(1)
compLimitAmount Decimal? @map("Comp_Limit_Amount") @db.Decimal(18, 2)
copyWorkRolesFlag Boolean @map("Copy_Work_Roles_Flag")
copyWorkTypesFlag Boolean @map("Copy_Work_Types_Flag")
prorateFlag Boolean @map("Prorate_Flag")
blInvTemplateSetupRecId Int? @map("BL_InvTemplate_Setup_RecID")
integrationXref String? @map("Integration_Xref") @db.NVarChar(50)
emailTemplateRecId Int? @map("Email_Template_RecID")
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
enteredBy String @map("Entered_By") @db.NVarChar(15)
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
autoInvoiceFlag Boolean @map("Auto_Invoice_Flag")
invoiceProratedAdditionsFlag Boolean @map("Invoice_Prorated_Additions_Flag")
id String @map("Id") @db.UniqueIdentifier
opportunities Opportunity[]
ivProducts IV_Product[]
@@map("AGR_Type")
@@schema("dbo")
}
model SrService {
srServiceRecId Int @id @map("SR_Service_RecID")
srTypeRecId Int? @map("SR_Type_RecID")
srLocationRecId Int? @map("SR_Location_RecID")
srStatusRecId Int @map("SR_Status_RecID")
srSourceRecId Int? @map("SR_Source_RecID")
srUrgencyRecId Int @map("SR_Urgency_RecID")
srTeamRecId Int? @map("SR_Team_RecID")
enteredBy String? @map("Entered_By") @db.NVarChar(15)
enteredNotifyFlag Boolean @map("Entered_Notify_Flag")
dateEntered DateTime? @map("Date_Entered") @db.DateTime
dateReq DateTime? @map("Date_Req") @db.Date
companyRecId Int? @map("Company_RecID")
contactRecId Int? @map("Contact_RecID")
assignedByRecId Int? @map("Assigned_By_RecID")
assignedNotifyFlag Boolean @map("Assigned_Notify_Flag")
billingUnitRecId Int? @map("Billing_Unit_RecID")
redFlag Boolean @map("Red_Flag")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime? @map("Last_Update") @db.DateTime
addressLine1 String? @map("Address_Line1") @db.NVarChar(50)
addressLine2 String? @map("Address_Line2") @db.NVarChar(50)
city String? @map("City") @db.NVarChar(50)
stateId String? @map("State_ID") @db.NVarChar(50)
zip String? @map("Zip") @db.NVarChar(12)
contactName String? @map("Contact_Name") @db.NVarChar(62)
phoneNbr String? @map("PhoneNbr") @db.NVarChar(20)
extension String? @map("Extension") @db.NVarChar(15)
ownerLevelRecId Int @map("Owner_Level_RecID")
emailAddress String? @map("Email_Address") @db.NVarChar(250)
summary String? @map("Summary") @db.NVarChar(100)
publishFlag Boolean @map("Publish_Flag")
closedBy String? @map("Closed_By") @db.NVarChar(15)
dateClosed DateTime? @map("Date_Closed") @db.DateTime
hoursBudget Decimal? @map("Hours_Budget") @db.Decimal(18, 2)
timeBillableFlag Boolean? @map("Time_Billable_Flag")
timeBillableFlagAlt Boolean? @map("TimeBillable_Flag")
expBillableFlag Boolean? @map("ExpBillable_Flag")
activityClassRecId Int? @map("Activity_Class_RecID")
activityTypeRecId Int? @map("Activity_Type_RecID")
poNumber String? @map("PO_Number") @db.NVarChar(50)
reference String? @map("Reference") @db.NVarChar(50)
billCompleteFlag Boolean? @map("BillComplete_Flag")
billUnappFlag Boolean? @map("BillUnapp_Flag")
billMethod String? @map("Bill_Method") @db.Char(1)
billSrFlag Boolean? @map("BillSR_Flag")
billingAmount Decimal? @map("Billing_Amount") @db.Decimal(18, 2)
companyAddressRecId Int? @map("Company_Address_RecID")
timeInvoiceFlag Boolean? @map("TimeInvoice_Flag")
expInvoiceFlag Boolean? @map("ExpInvoice_Flag")
prodInvoiceFlag Boolean? @map("ProdInvoice_Flag")
prodBillableFlag Boolean? @map("ProdBillable_Flag")
agrHeaderRecId Int? @map("AGR_Header_RecID")
overrideFlag Boolean? @map("Override_Flag")
srBillingMethodId String? @map("SR_Billing_Method_ID") @db.Char(1)
agrAmount Decimal? @map("AGR_Amount") @db.Decimal(18, 2)
agrMonth Int? @map("AGR_Month") @db.SmallInt
agrYear Int? @map("AGR_Year") @db.SmallInt
srSeverityRecId Int? @map("SR_Severity_RecID")
srImpactRecId Int? @map("SR_Impact_RecID")
srBoardRecId Int @map("SR_Board_RecID")
billingCompanyRecId Int? @map("Billing_Company_RecID")
billingAddressRecId Int? @map("Billing_Address_RecID")
externalHoursWorked Decimal? @map("External_Hours_Worked") @db.Decimal(18, 0)
opportunityRecId Int? @map("Opportunity_RecID")
mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier
approvedFlag Boolean @map("Approved_Flag")
externalXref String? @map("External_Xref") @db.NVarChar(100)
siteName String? @map("Site_Name") @db.NVarChar(50)
subDateAccepted DateTime? @map("Sub_Date_Accepted") @db.DateTime
subCompanyName String? @map("Sub_Company_Name") @db.NVarChar(50)
subCompanyRecId Int? @map("Sub_Company_RecID")
subContactName String? @map("Sub_Contact_Name") @db.NVarChar(62)
subContactRecId Int? @map("Sub_Contact_RecID")
subEmailAddress String? @map("Sub_Email_Address") @db.NVarChar(250)
subPhoneNbr String? @map("Sub_PhoneNbr") @db.NVarChar(30)
subExtension String? @map("Sub_Extension") @db.NVarChar(15)
subBillingMethodId String? @map("Sub_Billing_Method_ID") @db.Char(1)
subBillingAmount Decimal? @map("Sub_Billing_Amount") @db.Decimal(18, 2)
subTicketNbr String? @map("Sub_Ticket_Nbr") @db.NVarChar(25)
subOverrideFlag Boolean? @map("Sub_Override_Flag")
rejectedFlag Boolean @map("Rejected_Flag")
dateRejected DateTime? @map("Date_Rejected") @db.DateTime
cnSurveyCompletedFlag Boolean @map("Cn_Survey_Completed_Flag")
pmPhaseRecId Int? @map("PM_Phase_RecID")
wbsCode String? @map("WBS_Code") @db.VarChar(50)
recType String @map("Rec_Type") @db.Char(1)
emailContactFlag Boolean? @map("EmailContact_Flag")
emailResourceFlag Boolean? @map("EmailResource_Flag")
emailCcFlag Boolean? @map("EmailCC_Flag")
emailCc String? @map("EmailCC") @db.NVarChar(4000)
custUpdateFlag String? @map("CustUpdate_Flag") @db.Char(1)
countryRecId Int? @map("Country_RecID")
kbCategoryRecId Int? @map("KB_Category_RecID")
kbSubCategoryRecId Int? @map("KB_SubCategory_RecID")
kbLinkRecId Int? @map("KB_Link_RecID")
kbLinkType String? @map("KB_Link_Type") @db.Char(1)
srSlaRecId Int? @map("SR_SLA_RecID")
orderHeaderRecId Int? @map("Order_Header_RecID")
expBillableFlagAlt Boolean? @map("Exp_Billable_Flag")
srSubTypeRecId Int? @map("SR_SubType_RecID")
dateEnteredUtc DateTime? @map("Date_Entered_UTC") @db.DateTime
lastUpdatedUtc DateTime? @map("Last_Update_UTC") @db.DateTime
dateClosedUtc DateTime? @map("Date_Closed_UTC") @db.DateTime
subDateAcceptedUtc DateTime? @map("Sub_Date_Accepted_UTC") @db.DateTime
dateRejectedUtc DateTime? @map("Date_Rejected_UTC") @db.DateTime
srSubTypeItemRecId Int? @map("SR_SubTypeItem_RecID")
restrictDownpaymentFlag Boolean @map("Restrict_Downpayment_Flag")
estStartDateUtc DateTime? @map("Est_Start_Date_UTC") @db.Date
avaValidatedFlag Boolean @map("Ava_Validated_Flag")
ticketOwnerRecId Int? @map("Ticket_Owner_RecID")
billingContactRecId Int? @map("Billing_Contact_RecID")
billingTermsRecId Int? @map("Billing_Terms_RecID")
taxCodeRecId Int? @map("Tax_Code_RecID")
shippingCompanyRecId Int? @map("Shipping_Company_RecID")
shippingAddressRecId Int? @map("Shipping_Address_RecID")
shippingContactRecId Int? @map("Shipping_Contact_RecID")
estTimeRevenue Decimal @map("Est_Time_Revenue") @db.Decimal(18, 2)
estExpenseRevenue Decimal @map("Est_Expense_Revenue") @db.Decimal(18, 2)
estProductRevenue Decimal @map("Est_Product_Revenue") @db.Decimal(18, 2)
estTimeCost Decimal @map("Est_Time_Cost") @db.Decimal(18, 2)
estExpenseCost Decimal @map("Est_Expense_Cost") @db.Decimal(18, 2)
estProductCost Decimal @map("Est_Product_Cost") @db.Decimal(18, 2)
currencyRecId Int @map("Currency_RecID")
srServiceRecIdComputed String? @map("SR_Service_RecID_Computed") @db.NVarChar(10)
isClosedFlag Boolean @map("IsClosed_Flag")
parentRecId Int? @map("Parent_RecID")
latestSentimentScore Decimal? @map("Latest_Sentiment_Score") @db.Decimal(9, 2)
srType SrType? @relation(fields: [srTypeRecId], references: [srTypeRecId], onDelete: NoAction, onUpdate: NoAction)
srLocation SrLocation? @relation(fields: [srLocationRecId], references: [srLocationRecId], onDelete: NoAction, onUpdate: NoAction)
srStatus SrStatus @relation(fields: [srStatusRecId], references: [srStatusRecId], onDelete: NoAction, onUpdate: NoAction)
srSource SrSource? @relation(fields: [srSourceRecId], references: [srSourceRecId], onDelete: NoAction, onUpdate: NoAction)
srUrgency SrUrgency @relation(fields: [srUrgencyRecId], references: [srUrgencyRecId], onDelete: NoAction, onUpdate: NoAction)
srTeam SrTeam? @relation(fields: [srTeamRecId], references: [srTeamRecId], onDelete: NoAction, onUpdate: NoAction)
activityClass ActivityClass? @relation(fields: [activityClassRecId], references: [activityClassRecId], onDelete: NoAction, onUpdate: NoAction)
activityType ActivityType? @relation(fields: [activityTypeRecId], references: [activityTypeRecId], onDelete: NoAction, onUpdate: NoAction)
srSeverity SrSeverity? @relation(fields: [srSeverityRecId], references: [srSeverityRecId], onDelete: NoAction, onUpdate: NoAction)
srImpact SrImpact? @relation(fields: [srImpactRecId], references: [srImpactRecId], onDelete: NoAction, onUpdate: NoAction)
srBoard SrBoard @relation(fields: [srBoardRecId], references: [srBoardRecId], onDelete: NoAction, onUpdate: NoAction)
country Country? @relation(fields: [countryRecId], references: [countryRecId], onDelete: NoAction, onUpdate: NoAction)
opportunities Opportunity[]
ticketNotes TicketNote[]
ivProducts IV_Product[]
@@map("SR_Service")
@@schema("dbo")
}
model TicketNote {
ticketNoteRecId Int @id @map("SR_Detail_RecID")
srServiceRecId Int @map("SR_Service_RecID")
problemFlag Boolean @map("Problem_Flag")
resolutionFlag Boolean @map("Resolution_Flag")
internalAnalysisFlag Boolean @map("InternalAnalysis_Flag")
documentFlag Boolean @map("Document_Flag")
internalMemberFlag Boolean @map("Internal_Member_Flag")
externalSourceFlag Boolean @map("External_Source_Flag")
dateFormat Int? @map("Date_Format")
dateCreated DateTime @map("Date_Created") @db.DateTime
createdBy String? @map("Created_By") @db.NVarChar(150)
lastUpdate DateTime @map("Last_Update") @db.DateTime
updatedBy String? @map("Updated_By") @db.NVarChar(150)
mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier
memberRecId Int? @map("Member_RecID")
contactRecId Int? @map("Contact_RecID")
dbTimestamp Unsupported("timestamp") @map("DB_Timestamp")
dateCreatedUtc DateTime? @map("Date_Created_UTC") @db.DateTime
lastUpdatedUtc DateTime? @map("Last_Update_UTC") @db.DateTime
mergedFlag Boolean @map("Merged_Flag")
bundledFlag Boolean @map("Bundled_Flag")
originalAuthor String? @map("Original_Author") @db.NVarChar(150)
issueFlag Boolean @map("Issue_Flag")
notes String? @map("SR_Detail_Notes") @db.NVarChar(4000)
notesMarkdown String? @map("SR_Detail_Notes_Markdown") @db.NVarChar(Max)
sentimentScore Decimal? @map("Sentiment_Score") @db.Decimal(9, 2)
createdByParentFlag Boolean @map("Created_By_Parent_Flag")
srService SrService @relation(fields: [srServiceRecId], references: [srServiceRecId], onDelete: NoAction, onUpdate: NoAction)
member Member? @relation(fields: [memberRecId], references: [memberRecId], onDelete: NoAction, onUpdate: NoAction)
contact Contact? @relation(fields: [contactRecId], references: [contactRecId], onDelete: NoAction, onUpdate: NoAction)
@@map("SR_Detail")
@@schema("dbo")
}
model ActivityClass {
activityClassRecId Int @id @map("Activity_Class_RecID")
description String @map("Description") @db.NVarChar(50)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(15)
inactiveFlag Boolean @map("Inactive_Flag")
xrefWorkCode String? @map("Xref_Work_Code") @db.NVarChar(10)
taxExemptFlag Boolean @map("taxexempt_flag")
hourlyRate Decimal? @map("Hourly_Rate") @db.Decimal(18, 2)
integrationXref String? @map("Integration_Xref") @db.NVarChar(50)
lastUpdatedUtc 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
services SrService[]
@@map("Activity_Class")
@@schema("dbo")
}
model ActivityType {
activityTypeRecId Int @id @map("Activity_Type_RecID")
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)
inactiveFlag Boolean @map("Inactive_Flag")
invoiceFlag Boolean @map("Invoice_Flag")
lastUpdate DateTime @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(15)
billableFlag Boolean @map("Billable_Flag")
utilizationFlag Boolean @map("Utilization_Flag")
xrefWorkType String? @map("Xref_Work_Type") @db.NVarChar(10)
costMultiplier Decimal? @map("Cost_Multiplier") @db.Decimal(18, 2)
actDefaultFlag Boolean? @map("Act_Default_Flag")
timeAccrualTypeId String? @map("TimeAccrual_Type_ID") @db.Char(1)
roundBillHrs Decimal? @map("Round_Bill_Hrs") @db.Decimal(18, 2)
integrationXref String? @map("Integration_Xref") @db.NVarChar(50)
lastUpdatedUtc 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
services SrService[]
@@map("Activity_Type")
@@schema("dbo")
}
model SrBoard {
srBoardRecId Int @id @map("SR_Board_RecID")
boardName String? @map("Board_Name") @db.NVarChar(50)
ownerLevelRecId Int @map("Owner_Level_RecID")
billingUnitRecId Int @map("Billing_Unit_RecID")
boardIcon String? @map("Board_Icon") @db.NVarChar(100)
billCompleteFlag Boolean? @map("BillComplete_Flag")
billSrFlag Boolean? @map("BillSR_Flag")
billUnappFlag Boolean? @map("BillUnapp_Flag")
overrideFlag Boolean? @map("Override_Flag")
dispatchRecId Int? @map("Dispatch")
serviceManagerRecId Int? @map("ServiceManager")
dutyManagerRecId Int? @map("DutyManager")
activityClassRecId Int? @map("Activity_Class_RecID")
activityTypeRecId Int? @map("Activity_Type_RecID")
timeBillableFlag Boolean? @map("TimeBillable_Flag")
expBillableFlag Boolean? @map("ExpBillable_Flag")
prodBillableFlag Boolean? @map("ProdBillable_Flag")
timeInvoiceFlag Boolean? @map("TimeInvoice_Flag")
expInvoiceFlag Boolean? @map("ExpInvoice_Flag")
prodInvoiceFlag Boolean? @map("ProdInvoice_Flag")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
autocloseStatusRecId Int? @map("autoclose_status_recid")
autoAssignNewFlag Boolean? @map("AutoAssignNew_Flag")
autoAssignEcFlag Boolean? @map("AutoAssignEC_Flag")
autoAssignPortalFlag Boolean? @map("AutoAssignPortal_Flag")
srSignoffRecId Int @map("SR_Signoff_RecID")
ecReOpenStatus Int? @map("EC_ReOpen_Status")
projectFlag Boolean @map("Project_Flag")
emailContactFlag Boolean? @map("EmailContact_Flag")
emailResourceFlag Boolean? @map("EmailResource_Flag")
lockDescFlag Boolean? @map("LockDesc_Flag")
srProblemFlag Boolean? @map("SR_Problem_Flag")
additionsLockTimeFlag Boolean? @map("AdditionsLockTime_Flag")
defaultNotifyFrom String? @map("Default_Notify_From") @db.NVarChar(50)
oncallRecId Int? @map("Oncall")
inactiveFlag Boolean? @map("Inactive_Flag")
displayName String? @map("Display_Name") @db.NVarChar(60)
srResolutionFlag Boolean @map("SR_Resolution_Flag")
srInternalAnalysisFlag Boolean @map("SR_InternalAnalysis_Flag")
teProblemFlag Boolean @map("TE_Problem_Flag")
teResolutionFlag Boolean @map("TE_Resolution_Flag")
teInternalAnalysisFlag Boolean @map("TE_InternalAnalysis_Flag")
problemSort String @map("Problem_Sort") @db.Char(1)
resolutionSort String @map("Resolution_Sort") @db.Char(1)
internalAnalysisSort String @map("InternalAnalysis_Sort") @db.Char(1)
emailContactTemplateRecId Int? @map("EmailContact_Template_RecID")
emailResourceTemplateRecId Int? @map("EmailResource_Template_RecID")
ecReOpenResourcesFlag Boolean? @map("EC_ReOpen_Resources_Flag")
ecCompanyMatchFlag Boolean @map("EC_Company_Match_Flag")
ecReOpenDaysFlag Boolean @map("EC_ReOpen_Days_Flag")
ecReOpenDays Int @map("EC_ReOpen_Days")
memberDisplayNameFlag Boolean @map("Member_Display_Name_Flag")
emailCcFlag Boolean @map("EmailCc_Flag")
showDependencies Boolean @map("Show_Dependencies")
showEstimates Boolean @map("Show_Estimates")
autoAssignTicketOwnerFlag Boolean @map("AutoAssignTicketOwner_Flag")
srAllNotesFlag Boolean @map("SR_All_Notes_Flag")
allSort String @map("All_Sort") @db.Char(1)
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
enteredBy String @map("Entered_By") @db.NVarChar(15)
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
ecAllowReopenClosedFlag Boolean @map("EC_Allow_Reopen_Closed_Flag")
percentageCalculationRecId Int? @map("Percentage_Calculation_RecID")
ecReOpenDaysClosed Int @map("EC_ReOpen_Days_Closed")
markFirstNoteIssueFlag Boolean @map("Mark_First_Note_Issue_Flag")
restrictBoardByDefaultFlag Boolean @map("Restrict_Board_By_Default_Flag")
autoAssignLimitFlag Boolean @map("AutoAssignLimit_Flag")
autoAssignLimitAmount Int @map("AutoAssignLimit_Amount")
sendToBundledFlag Boolean @map("Send_To_Bundled_Flag")
id String @map("Id") @db.UniqueIdentifier
services SrService[]
@@map("SR_Board")
@@schema("dbo")
}
model SrImpact {
srImpactRecId Int @id @map("SR_Impact_RecID")
impactName String @map("SR_Impact_Name") @db.NVarChar(10)
impactDesc String @map("SR_Impact_Desc") @db.NVarChar(200)
defaultFlag Boolean? @map("Default_Flag")
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
enteredBy String @map("Entered_By") @db.NVarChar(15)
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
updatedBy String @map("Updated_By") @db.NVarChar(15)
localeKeyRecId Int? @map("Locale_Key_RecID")
id String @map("Id") @db.UniqueIdentifier
services SrService[]
@@map("SR_Impact")
@@schema("dbo")
}
model SrLocation {
srLocationRecId Int @id @map("SR_Location_RecID")
description String? @map("Description") @db.NVarChar(30)
defaultFlag Boolean @map("Default_Flag")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
locationId String? @map("Location_ID") @db.Char(1)
lastUpdatedUtc 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
services SrService[]
@@map("SR_Location")
@@schema("dbo")
}
model SrSeverity {
srSeverityRecId Int @id @map("SR_Severity_RecID")
severityName String? @map("SR_Severity_Name") @db.NVarChar(10)
severityDesc String? @map("SR_Severity_Desc") @db.NVarChar(200)
defaultFlag Boolean? @map("Default_Flag")
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
enteredBy String @map("Entered_By") @db.NVarChar(15)
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
updatedBy String @map("Updated_By") @db.NVarChar(15)
localeKeyRecId Int? @map("Locale_Key_RecID")
id String @map("Id") @db.UniqueIdentifier
services SrService[]
@@map("SR_Severity")
@@schema("dbo")
}
model SrSource {
srSourceRecId Int @id @map("SR_Source_RecID")
description String? @map("Description") @db.NVarChar(50)
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime? @map("Last_Update") @db.DateTime2
defaultFlag Boolean @map("Default_Flag")
lastUpdatedUtc 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
services SrService[]
@@map("SR_Source")
@@schema("dbo")
}
model SrStatus {
srStatusRecId Int @id @map("SR_Status_RecID")
ownerLevelRecId Int? @map("Owner_Level_RecID")
billingUnitRecId Int? @map("Billing_Unit_RecID")
description String? @map("Description") @db.NVarChar(50)
defaultFlag Boolean @map("Default_Flag")
sortOrder Int? @map("Sort_Order") @db.SmallInt
boardFlag Boolean @map("Board_Flag")
closedFlag Boolean @map("Closed_Flag")
noTimeFlag Boolean @map("No_Time_Flag")
lastUpdate DateTime @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(15)
srNotifyTypeId String? @map("SR_Notify_Type_ID") @db.Char(1)
memberRecId Int? @map("Member_RecID")
workflowStep Int? @map("Workflow_Step")
resolvedFlag Boolean? @map("Resolved_Flag")
noEscalationFlag Boolean? @map("NoEscalation_Flag")
escalationLevel Int? @map("Escalation_Level") @db.SmallInt
srBoardRecId Int? @map("SR_Board_RecID")
customerPortalFlag Boolean? @map("Customer_Portal_Flag")
svSetupHdrRecId Int? @map("SV_SetupHdr_RecID")
inactiveFlag Boolean @map("Inactive_Flag")
longDescription String? @map("Long_Description") @db.NVarChar(500)
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
enteredBy String @map("Entered_By") @db.NVarChar(15)
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
statusIndicatorRecId Int? @map("Status_Indicator_RecID")
customStatusIndicatorDescription String? @map("Custom_Status_Indicator_Description") @db.NVarChar(30)
roundRobinCatchallFlag Boolean? @map("RoundRobinCatchall_Flag")
saveTimeAsNoteFlag Boolean @map("SaveTimeAsNote_Flag")
id String @map("Id") @db.UniqueIdentifier
services SrService[]
@@map("SR_Status")
@@schema("dbo")
}
model SrTeam {
srTeamRecId Int @id @map("SR_Team_RecID")
description String? @map("Description") @db.NVarChar(30)
memberRecId Int? @map("Member_RecID")
ownerLevelRecId Int? @map("Owner_Level_RecID")
billingUnitRecId Int? @map("Billing_Unit_RecID")
defaultFlag Boolean @map("Default_Flag")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
srBoardRecId Int? @map("SR_Board_RecID")
deleteNotifyFlag Boolean? @map("DeleteNotify_Flag")
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
enteredBy String @map("Entered_By") @db.NVarChar(15)
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
roundRobinFlag Boolean? @map("RoundRobin_Flag")
defaultRoundRobinFlag Boolean? @map("Default_RoundRobin_Flag")
id String @map("Id") @db.UniqueIdentifier
services SrService[]
@@map("SR_Team")
@@schema("dbo")
}
model SrType {
srTypeRecId Int @id @map("SR_Type_RecID")
ownerLevelRecId Int? @map("Owner_Level_RecID")
billingUnitRecId Int? @map("Billing_Unit_RecID")
description String @map("Description") @db.NVarChar(50)
updatedBy String @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
defaultFlag Boolean? @map("Default_Flag")
activeType String? @map("ActiveType") @db.Char(1)
srBoardRecId Int? @map("SR_Board_RecID")
inactiveFlag Boolean @map("Inactive_Flag")
rfcFlag Boolean? @map("RFC_Flag")
integrationXref String? @map("Integration_Xref") @db.NVarChar(50)
lastUpdatedUtc 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
services SrService[]
@@map("SR_Type")
@@schema("dbo")
}
model SrUrgency {
srUrgencyRecId Int @id @map("SR_Urgency_RecID")
color String? @map("Color") @db.NVarChar(50)
imageLink String? @map("Image_Link") @db.NVarChar(100)
description String? @map("Description") @db.NVarChar(50)
sortOrder Int @map("Sort_Order")
defaultFlag Boolean @map("Default_Flag")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
responseHours Decimal @map("Response_Hours") @db.Decimal(18, 2)
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
dateCreatedUtc DateTime @map("Date_Created_UTC") @db.DateTime2
createdBy String? @map("Created_By") @db.NVarChar(15)
localeKeyRecId Int? @map("Locale_Key_RecID")
urgencyLevel String? @map("Urgency_Level") @db.NVarChar(15)
id String @map("Id") @db.UniqueIdentifier
services SrService[]
@@map("SR_Urgency")
@@schema("dbo")
}
model Country {
country String @map("Country") @db.NVarChar(50)
countryRecId Int @id @map("Country_RecID")
currencyId String? @map("Currency_ID") @db.NVarChar(10)
defaultFlag Boolean @map("Default_Flag")
lastUpdate DateTime @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(15)
localizationId String? @map("Localization_ID") @db.Char(1)
caption1 String? @map("Caption1") @db.Char(25)
caption2 String? @map("Caption2") @db.Char(25)
caption3 String? @map("Caption3") @db.Char(25)
caption4 String? @map("Caption4") @db.Char(25)
caption5 String? @map("Caption5") @db.Char(25)
value1 String? @map("Value1") @db.Char(50)
value2 String? @map("Value2") @db.Char(50)
value3 String? @map("Value3") @db.Char(50)
value4 String? @map("Value4") @db.Char(50)
value5 String? @map("Value5") @db.Char(50)
cityCaption String? @map("City_Caption") @db.NVarChar(25)
stateCaption String? @map("State_Caption") @db.NVarChar(25)
zipCaption String? @map("Zip_Caption") @db.NVarChar(25)
dialPrefix String? @map("Dial_Prefix") @db.NVarChar(5)
zipMinLength Int @map("Zip_Min_Length") @db.SmallInt
addressFormatRecId Int? @map("Address_Format_RecID")
countryCode String? @map("Country_Code") @db.NVarChar(2)
lastUpdatedUtc DateTime @map("Last_Update_UTC") @db.DateTime2
enteredBy String @map("Entered_By") @db.NVarChar(15)
dateEnteredUtc DateTime @map("Date_Entered_UTC") @db.DateTime2
countryCodeIsoAlpha2 String? @map("Country_Code_ISO_ALPHA2") @db.NVarChar(2)
id String @map("Id") @db.UniqueIdentifier
disabled Boolean @map("Disabled")
services SrService[]
@@map("Country")
@@schema("dbo")
}
// =====================
// OPPORTUNITY RELATED
// =====================
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
opportunity Opportunity? @relation(fields: [opportunityRecId], references: [opportunityRecId], onDelete: NoAction, onUpdate: NoAction)
@@map("SO_Activity")
@@schema("dbo")
}
model SoNote {
soNotesRecId Int @id @map("SO_Notes_RecID")
opportunityRecId Int? @map("Opportunity_RecID")
seqNbr Int? @map("Seq_Nbr")
noteTypeRecId Int? @map("Note_Type_RecID")
notes String? @map("Notes") @db.NVarChar(Max)
soFlag Boolean @map("SO_Flag")
enteredBy String? @map("Entered_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(15)
mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier
lastUpdatedUTC DateTime @map("Last_Update_UTC") @db.DateTime2
opportunity Opportunity? @relation(fields: [opportunityRecId], references: [opportunityRecId], onDelete: NoAction, onUpdate: NoAction)
@@map("SO_Note")
@@schema("dbo")
}
model SoForecastDtl {
soForecastDtlRecId Int @id @map("SO_Forecast_Dtl_RecID")
opportunityRecId Int @map("Opportunity_RecID")
description String? @map("Description") @db.NVarChar(50)
revenue Decimal? @map("Revenue") @db.Decimal(18, 2)
cost Decimal? @map("Cost") @db.Decimal(18, 2)
soOppStatusRecId Int? @map("SO_Opp_Status_RecID")
includeFlag Boolean @map("Include_Flag")
quoteWerksDocNo String? @map("QuoteWerks_DocNO") @db.NVarChar(20)
quoteWerksDocName String? @map("QuoteWerks_DocName") @db.NVarChar(255)
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
soForecastTypeId String? @map("SO_Forecast_Type_ID") @db.NVarChar(2)
linkFlag Boolean @map("Link_Flag")
recurringRevenue Decimal? @map("Recurring_Revenue") @db.Decimal(18, 2)
recurringCost Decimal? @map("Recurring_Cost") @db.Decimal(18, 2)
recurringDateStart DateTime? @map("Recurring_Date_Start") @db.DateTime2
recurringDateEnd DateTime? @map("Recurring_Date_End") @db.DateTime2
billCycleRecId Int? @map("Bill_Cycle_RecID")
cycleBasisId String? @map("Cycle_Basis_ID") @db.Char(1)
recurringFlag Boolean @map("Recurring_Flag")
productFlag Boolean @map("Product_Flag")
mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier
lastUpdatedUTC DateTime @map("Last_Update_UTC") @db.DateTime2
opportunity Opportunity @relation(fields: [opportunityRecId], references: [opportunityRecId], onDelete: NoAction, onUpdate: NoAction)
recurringRows SoRecurring[]
ivProducts IV_Product[]
@@map("SO_Forecast_Dtl")
@@schema("dbo")
}
model SoRecurring {
soRecurringRecId Int @id @map("SO_Recurring_RecID")
soForecastDtlRecId Int? @map("SO_Forecast_Dtl_RecID")
revenue Decimal? @map("Revenue") @db.Decimal(18, 2)
cost Decimal? @map("Cost") @db.Decimal(18, 2)
periodStart DateTime @map("Period_Start") @db.DateTime
periodEnd DateTime @map("Period_End") @db.DateTime
forecastItem SoForecastDtl? @relation(fields: [soForecastDtlRecId], references: [soForecastDtlRecId], onDelete: NoAction, onUpdate: NoAction)
@@map("SO_Recurring")
@@schema("dbo")
}
model SoInfluencer {
soInfluencerRecId Int @id @map("SO_Influencer_RecID")
opportunityRecId Int? @map("Opportunity_RecID")
contactRecId Int? @map("Contact_RecID")
contactName String? @map("Contact_Name") @db.NVarChar(62)
phoneNbr String? @map("PhoneNbr") @db.NVarChar(250)
emailAddress String? @map("Email_Address") @db.NVarChar(250)
companyRecId Int? @map("Company_RecID")
companyName String? @map("Company_Name") @db.NVarChar(50)
soRoleRecId Int? @map("SO_Role_RecID")
notes String? @map("Notes") @db.NVarChar(Max)
lastUpdate DateTime? @map("Last_Update") @db.DateTime2
updatedBy String? @map("Updated_By") @db.NVarChar(15)
referralFlag Boolean @map("Referral_Flag")
opportunity Opportunity? @relation(fields: [opportunityRecId], references: [opportunityRecId], onDelete: NoAction, onUpdate: NoAction)
@@map("SO_Influencers")
@@schema("dbo")
}
model OpportunityMember {
opportunityRecId Int @map("Opportunity_RecID")
memberRecId Int @map("Member_RecID")
primarySalesFlag Boolean @map("PrimarySales_Flag")
secondarySalesFlag Boolean @map("SecondarySales_Flag")
individualFlag Boolean @map("Individual_Flag")
teamFlag Boolean @map("Team_Flag")
allowAccessFlag Boolean @map("AllowAccess_Flag")
opportunity Opportunity @relation("OpportunityMemberToOpportunity", fields: [opportunityRecId], references: [opportunityRecId], onDelete: NoAction, onUpdate: NoAction)
member Member @relation("OpportunityMemberToMember", fields: [memberRecId], references: [memberRecId], onDelete: NoAction, onUpdate: NoAction)
@@id([opportunityRecId, memberRecId])
@@map("SO_Opportunity_Member")
@@schema("dbo")
}
model V_RptOpportunityCustomFields {
customfieldPodId String @map("customfield_podID") @db.NVarChar(50)
opportunityRecId Int @map("Opportunity_RecID")
opportunityName String @map("Opportunity_Name") @db.NVarChar(100)
opportunityCustomfield String @map("opportunity_customfield") @db.NVarChar(25)
opportunityCustomvalue String? @map("opportunity_customvalue") @db.NVarChar(1000)
opportunityFieldtype String? @map("opportunity_fieldtype") @db.NVarChar(20)
updatedBy String @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
timeZone String? @map("Time_Zone") @db.NVarChar(100)
userDefinedFieldRecId Int @map("User_Defined_Field_RecID")
opportunity Opportunity @relation(fields: [opportunityRecId], references: [opportunityRecId], onDelete: NoAction, onUpdate: NoAction)
@@id([opportunityRecId, userDefinedFieldRecId])
@@map("v_rpt_OpportunityCustomFields")
@@schema("dbo")
}
model V_IV_Product_Custom_Fields {
ivProductRecId Int @id @map("IV_Product_RecID")
procurementNotes String? @map("ProcurementNotes") @db.NVarChar(1000)
productNarrative String? @map("ProductNarrative") @db.NVarChar(1000)
productcatalogMetadata String? @map("productcatalog_metadata") @db.NVarChar(1000)
ivProduct IV_Product @relation(fields: [ivProductRecId], references: [ivProductRecId], onDelete: NoAction, onUpdate: NoAction)
@@map("v_IV_Product_Custom_Fields")
@@schema("dbo")
}
// =====================
// SCHEDULE
// =====================
model ScheduleSpan {
scheduleSpanRecId Int @id @map("Schedule_Span_RecID") @db.SmallInt
scheduleSpanId String? @map("Schedule_Span_ID") @db.NVarChar(1)
spanDesc String? @map("Span_Desc") @db.NVarChar(20)
localeKeyRecId Int? @map("Locale_Key_RecID")
schedules Schedule[]
@@map("Schedule_Span")
@@schema("dbo")
}
model ScheduleStatus {
scheduleStatusRecId Int @id @map("Schedule_Status_RecID")
description String? @map("Description") @db.NVarChar(30)
softFlag Boolean @map("Soft_Flag")
defaultFlag Boolean @map("Default_Flag")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime2
color String? @map("Color") @db.NVarChar(25)
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[]
@@map("Schedule_Status")
@@schema("dbo")
}
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
schedules Schedule[]
@@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)
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)
@@map("Schedule")
@@schema("dbo")
}
model ScheduleDetail {
scheduleDetailRecId Int @id @map("Schedule_Detail_RecID")
scheduleRecId Int? @map("Schedule_RecID")
dateScheduled DateTime? @map("Date_Scheduled") @db.DateTime
hoursScheduled Decimal? @map("Hours_Scheduled") @db.Decimal(18, 2)
priority Int? @map("Priority") @db.SmallInt
startTime DateTime? @map("Start_Time") @db.DateTime
endTime DateTime? @map("End_Time") @db.DateTime
memberRecId Int? @map("Member_RecID")
scheduleTypeId String? @map("Schedule_Type_ID") @db.Char(1)
recId Int? @map("RecID")
updatedBy String? @map("Updated_By") @db.NVarChar(15)
lastUpdate DateTime @map("Last_Update") @db.DateTime
timeFlag Boolean? @map("time_flag")
mobileGuid String @map("Mobile_Guid") @db.UniqueIdentifier
exchangeHref String? @map("Exchange_Href") @db.NVarChar(300)
revisionId Int? @map("Revision_ID")
appointmentHash String? @map("Appointment_Hash") @db.NVarChar(100)
dateTimeStartUtc DateTime? @map("Date_Time_Start_UTC") @db.SmallDateTime
dateTimeEndUtc DateTime? @map("Date_Time_End_UTC") @db.SmallDateTime
lastUpdateUtc DateTime @map("Last_Update_UTC") @db.DateTime
privateFlag Boolean @map("Private_Flag")
changeKey String? @map("Change_Key") @db.NVarChar(300)
masterSeriesId String? @map("Master_Series_ID") @db.NVarChar(300)
iCalUid String? @map("ICal_UID") @db.NVarChar(512)
teamsMeetingFlag Boolean @map("Teams_Meeting_Flag")
schedule Schedule? @relation(fields: [scheduleRecId], references: [scheduleRecId], onDelete: NoAction, onUpdate: NoAction)
@@map("Schedule_Detail")
@@schema("dbo")
}