Appearance
dbo.primeLockedEstimates
Info Generated by
scripts/Generate-DataDictionary.ps1- do not edit by hand. Edit descriptions inschemas/tables/dbo.primeLockedEstimates.jsonand regenerate.
Columns
| # | Column | Type | Nullable | Flags | Description |
|---|---|---|---|---|---|
| 1 | EstimateID | uniqueidentifier | no | Foreign key to the related estimate | |
| 2 | jobId | uniqueidentifier | yes | Foreign key to primeJobs | |
| 3 | label | nvarchar(255) | yes | Display label | |
| 4 | description | nvarchar(MAX) | yes | Free-text description | |
| 5 | estimateStatus | nvarchar(50) | yes | Status of the estimate (e.g. Draft, Locked, Authorised) | |
| 6 | isVariation | bit | yes | Flag indicating this is a variation to the original scope of work | |
| 7 | estimateType | nvarchar(100) | yes | Type/category of the estimate | |
| 8 | totalIncludingTax | decimal(18,2) | yes | Total amount including tax | |
| 9 | authorisedTotalExcludingTax | decimal(18,2) | yes | Total authorised (approved) job value excluding tax | |
| 10 | authorisedTotalIncludingTax | decimal(18,2) | yes | Total authorised (approved) job value including tax | |
| 11 | createdAt | datetime | yes | Timestamp the record was created | |
| 12 | createdBy | nvarchar(100) | yes | User/system that created the record | |
| 13 | updatedAt | datetime | yes | Timestamp the record was last updated | |
| 14 | updatedBy | nvarchar(100) | yes | User/system that last updated the record | |
| 15 | version | bigint | yes | Optimistic-concurrency row version number |
Indexes
| Name | Type | Unique | PK | Key columns | Included | Filter |
|---|---|---|---|---|---|---|
| PK__primeLoc__ABEBF4D555D379C9 | CLUSTERED | yes | yes | EstimateID | ||
| IX_primeLockedEstimates_JobId_Label | NONCLUSTERED | jobId | authorisedTotalExcludingTax, authorisedTotalIncludingTax, createdAt, estimateStatus, estimateType, label, totalIncludingTax |
Relationships (inferred)
| From | To | Confidence |
|---|---|---|
| dbo.primeLockedEstimates.EstimateID | dbo.primeLockedEstimateCategories.EstimateID | high |
| dbo.primeLockedEstimates.jobId | dbo.primeJobs.Id | high |
Referenced by
Views: dbo.VPrimeAllestimatevalueObjectivedb, dbo.vprimeEstimatorQuoteConversions, dbo.vprimejobsthismonthObjectivedb
Procedures: dbo.spEndataEstimateUploads, dbo.spEthGetEstimateReview, dbo.spPrimeBuildLockedEstimatesThisYear, dbo.spPrimeUpsertLockedEstimate

