Appearance
dbo.primeAllocations
Info Generated by
scripts/Generate-DataDictionary.ps1- do not edit by hand. Edit descriptions inschemas/tables/dbo.primeAllocations.jsonand regenerate.
Columns
| # | Column | Type | Nullable | Flags | Description |
|---|---|---|---|---|---|
| 1 | Id | uniqueidentifier | no | Primary key / unique identifier for this record | |
| 2 | JobId | uniqueidentifier | yes | Foreign key to primeJobs | |
| 3 | AssignedContactId | uniqueidentifier | yes | Foreign key to primeContacts - the contact this record is assigned to | |
| 4 | AssignedId | uniqueidentifier | yes | Foreign key to primeUsers - the user this record is assigned to | |
| 5 | AllocationStatusId | uniqueidentifier | yes | Foreign key to primeAllocatonStatuses | |
| 6 | AllocationType | nvarchar(100) | yes | Type/category of allocation | |
| 7 | AllocationNumber | nvarchar(50) | yes | Allocation number/reference | |
| 8 | ObjectId | uniqueidentifier | yes | Identifier of the related object this record applies to | |
| 9 | ObjectType | nvarchar(100) | yes | Type of the related object this record applies to (e.g. Job, Contact) | |
| 10 | Label | nvarchar(100) | yes | Display label | |
| 11 | Description | nvarchar(1000) | yes | Free-text description | |
| 12 | Limit | money | yes | Monetary limit value | |
| 13 | SiteAttended | bit | yes | Flag indicating whether the site has been attended/visited | |
| 14 | Completed | bit | yes | Flag indicating whether the item/task has been completed | |
| 15 | FirstCustomerContactAt | datetime | yes | Timestamp of the first contact made with the customer | |
| 16 | CreatedAt | datetime | yes | Timestamp the record was created | |
| 17 | CreatedBy | nvarchar(100) | yes | User/system that created the record | |
| 18 | UpdatedAt | datetime | yes | Timestamp the record was last updated | |
| 19 | UpdatedBy | nvarchar(100) | yes | User/system that last updated the record | |
| 20 | Version | bigint | yes | Optimistic-concurrency row version number | |
| 21 | FilterTags | nvarchar(MAX) | yes | Comma-separated display list of filter tags applied to this record | |
| 22 | FilterTagIds | nvarchar(MAX) | yes | Comma-separated list of primeFilterTags identifiers applied to this record |
Indexes
| Name | Type | Unique | PK | Key columns | Included | Filter |
|---|---|---|---|---|---|---|
| PK__primeAll__3214EC07D09F9F0C | CLUSTERED | yes | yes | Id | ||
| nci_msft_1_primeAllocations_0AFCBCDD45B95E28EF6366A8336BA361 | NONCLUSTERED | JobId, AllocationStatusId | AllocationType |
Relationships (inferred)
| From | To | Confidence |
|---|---|---|
| dbo.primeAccountsReceivableInvoicesItemAllocation.AllocationId | dbo.primeAllocations.Id | high |
| dbo.primeAllocations.AllocationStatusId | dbo.primeAllocatonStatuses.id | high |
| dbo.primeAllocations.AssignedContactId | dbo.primeContacts.id | medium |
| dbo.primeAllocations.AssignedId | dbo.primeUsers.id | high |
| dbo.primeAllocations.JobId | dbo.primeJobs.Id | high |
| dbo.primeAllocations.JobId | dbo.makesafePhoneCall.PrimeJobID | medium |
Referenced by
Views: dbo.vPrimeSalesinvoicesObjectivedb
Procedures: dbo.spEthAIPrimeGetJobHash, dbo.spEthAIPrimeUpsertJobSummaryQueue, dbo.spEthSyncQueueMissingObjects, dbo.spEthSyncQueueMissingObjectsByJobID, dbo.spMakesafeUpsertPhoneCallFromPrimeJob, dbo.spPrimeGetAllocationTypesByJobID, dbo.spPrimeGetAllocationTypesByPhoneCallID, dbo.spPrimeGetJobAllocations, dbo.spPrimeUpsertAllocation, dbo.spPrimeUpsertJob

