Skip to content

dbo.primeEstimates ​

Info Generated by scripts/Generate-DataDictionary.ps1 - do not edit by hand. Edit descriptions in schemas/tables/dbo.primeEstimates.json and regenerate.

Columns ​

#ColumnTypeNullableFlagsDescription
1estimateIduniqueidentifiernoForeign key to the related estimate
2jobIduniqueidentifiernoForeign key to primeJobs
3labelnvarchar(255)noDisplay label
4descriptionnvarchar(MAX)yesFree-text description
5estimateStatusnvarchar(50)noStatus of the estimate (e.g. Draft, Locked, Authorised)
6isVariationbitnoFlag indicating this is a variation to the original scope of work
7estimateTypenvarchar(100)noType/category of the estimate
8totalIncludingTaxdecimal(18,2)noTotal amount including tax
9assignedIduniqueidentifieryesForeign key to primeUsers - the user this record is assigned to
10createdAtdatetime2(0)noTimestamp the record was created
11createdBynvarchar(200)noUser/system that created the record
12updatedAtdatetime2(0)noTimestamp the record was last updated
13updatedBynvarchar(200)noUser/system that last updated the record
14versionbigintnoOptimistic-concurrency row version number

Indexes ​

NameTypeUniquePKKey columnsIncludedFilter
PK_primeEstimatesCLUSTEREDyesyesestimateId
IX_primeEstimates_jobIdNONCLUSTEREDjobId
IX_primeEstimates_estimateStatusNONCLUSTEREDestimateStatus
IX_primeEstimates_createdAtNONCLUSTEREDcreatedAt
IX_primeEstimates_Jobid_StatusNONCLUSTEREDjobId, estimateStatus

Relationships (inferred) ​

FromToConfidence
dbo.primeEstimates.estimateIddbo.primeEstimateCategories.estimateIdhigh
dbo.primeEstimates.jobIddbo.primeJobs.Idhigh
dbo.primeStatusHistories_Job.JobIddbo.primeEstimates.jobIdmedium

Referenced by ​

Views: dbo.vprimefirstquote

Procedures: dbo.spEthGetEstimateReview, dbo.spPrimeDeleteEstimatesForJob, dbo.spPrimePeerReviewEstimatedetails, dbo.spPrimeUpsertEstimate