Appearance
dbo.primeEstimateCategoryItems
Info Generated by
scripts/Generate-DataDictionary.ps1- do not edit by hand. Edit descriptions inschemas/tables/dbo.primeEstimateCategoryItems.jsonand regenerate.
Columns
| # | Column | Type | Nullable | Flags | Description |
|---|---|---|---|---|---|
| 1 | itemId | uniqueidentifier | no | Foreign key to the related line item | |
| 2 | categoryId | uniqueidentifier | no | Foreign key to the related estimate category | |
| 3 | authorised | bit | no | Flag indicating whether this line item has been authorised (approved) | |
| 4 | trade | nvarchar(100) | yes | Trade/skill category (e.g. Plumbing, Electrical, Carpentry) | |
| 5 | description | nvarchar(MAX) | no | Free-text description | |
| 6 | notes | nvarchar(MAX) | yes | Free-text internal notes | |
| 7 | materialUnit | nvarchar(50) | yes | Unit of measure for material quantity | |
| 8 | materialQuantity | decimal(18,2) | no | Quantity of materials | |
| 9 | materialCost | decimal(18,2) | no | Cost of materials | |
| 10 | materialTotal | decimal(18,2) | no | Total material amount | |
| 11 | materialMarkup | decimal(9,6) | no | Markup percentage applied to material cost | |
| 12 | materialMarkupTotal | decimal(18,2) | no | Total markup amount applied to materials | |
| 13 | labourUnit | nvarchar(50) | yes | Unit of measure for labour quantity | |
| 14 | labourQuantity | decimal(18,2) | no | Quantity of labour (hours/units) | |
| 15 | labourCost | decimal(18,2) | no | Cost of labour | |
| 16 | labourTotal | decimal(18,2) | no | Total labour amount | |
| 17 | labourMarkup | decimal(9,6) | no | Markup percentage applied to labour cost | |
| 18 | labourMarkupTotal | decimal(18,2) | no | Total markup amount applied to labour | |
| 19 | tax | decimal(9,4) | no | Tax amount | |
| 20 | materialMargin | decimal(9,6) | no | Margin percentage applied to material cost | |
| 21 | labourMargin | decimal(9,6) | no | Margin percentage applied to labour cost |
Indexes
| Name | Type | Unique | PK | Key columns | Included | Filter |
|---|---|---|---|---|---|---|
| PK_primeEstimateCategoryItems | CLUSTERED | yes | yes | itemId | ||
| IX_primeEstimateCategoryItems_CategoryId | NONCLUSTERED | categoryId |
Relationships (inferred)
| From | To | Confidence |
|---|---|---|
| dbo.primeEstimateCategories.categoryId | dbo.primeEstimateCategoryItems.categoryId | high |
Referenced by
Procedures: dbo.spPrimeDeleteEstimatesForJob, dbo.spPrimePeerReviewEstimatedetails, dbo.spPrimeUpsertEstimateCategoryItem

