Table : buildings

Raw table description

Fields

id id

{
  "name": "id",
  "type": "primaryKey"
}

parentId  → buildings  (Is only used in commercial, to connect valuation units to a building)

{
  "name": "parentId",
  "type": "foreignKey",
  "table": "buildings",
  "note": "Is only used in commercial, to connect valuation units to a building"
}

estateId  → estates

{
  "name": "estateId",
  "type": "foreignKey",
  "table": "estates"
}

areaId  → areas

{
  "name": "areaId",
  "type": "foreignKey",
  "table": "areas"
}

estateEconomicTypeCodeId  → estateEconomicTypeCodes

{
  "name": "estateEconomicTypeCodeId",
  "type": "foreignKey",
  "table": "estateEconomicTypeCodes",
  "schema": "mspx_admin"
}

externalId

{
  "name": "externalId",
  "type": "text",
  "maxLength": 40
}

assessmentValue $$

{
  "name": "assessmentValue",
  "type": "money"
}

name

{
  "name": "name",
  "type": "text",
  "maxLength": 60
}

classification

{
  "name": "classification",
  "type": "text",
  "maxLength": 100
}

area

{
  "name": "area",
  "type": "decimal",
  "digits": 15,
  "decimals": 1
}

buildingTypeId  → buildingTypes

{
  "name": "buildingTypeId",
  "type": "foreignKey",
  "table": "buildingTypes",
  "schema": "mspx_admin"
}

comment

{
  "name": "comment",
  "type": "text"
}

isImported bit

{
  "name": "isImported",
  "type": "bit"
}

buildYear

{
  "name": "buildYear",
  "type": "year"
}

buildYearDescription

{
  "name": "buildYearDescription",
  "type": "text"
}

buildingType

{
  "name": "buildingType",
  "type": "text",
  "maxLength": 100
}

numberOfRooms

{
  "name": "numberOfRooms",
  "type": "decimal",
  "digits": 4,
  "decimals": 1
}

numberOfBedrooms

{
  "name": "numberOfBedrooms",
  "type": "int",
  "maxLength": 3
}

livingArea

{
  "name": "livingArea",
  "type": "decimal",
  "digits": 5,
  "decimals": 1
}

otherLivingArea

{
  "name": "otherLivingArea",
  "type": "decimal",
  "digits": 5,
  "decimals": 1
}

assessmentValueYear

{
  "name": "assessmentValueYear",
  "type": "year"
}

standardPoints

{
  "name": "standardPoints",
  "type": "int"
}

newRedevelopmentYear

{
  "name": "newRedevelopmentYear",
  "type": "year"
}

renovateDescription

{
  "name": "renovateDescription",
  "type": "text"
}

roomsDescription

{
  "name": "roomsDescription",
  "type": "text"
}

subFoundationType T

{
  "name": "subFoundationType",
  "type": "text",
  "maxLength": 100,
  "enums": [
    "ENUMS_SUBFOUNDATIONTYPE_TYPE_SAND (Sand)",
    "ENUMS_SUBFOUNDATIONTYPE_TYPE_MORAN (Morän)",
    "ENUMS_SUBFOUNDATIONTYPE_TYPE_LERA (Lera)",
    "ENUMS_SUBFOUNDATIONTYPE_TYPE_STONE (Sten)"
  ]
}

foundationType T

{
  "name": "foundationType",
  "type": "text",
  "maxLength": 100,
  "enums": [
    "ENUMS_FOUNDATIONTYPE_TYPE_TORPARGRUND (Torpargrund)",
    "ENUMS_FOUNDATIONTYPE_TYPE_PILES (Pålar)",
    "ENUMS_FOUNDATIONTYPE_TYPE_BLOCKS (Plintar)",
    "ENUMS_FOUNDATIONTYPE_TYPE_SLAB_ON_GROUND (Platta på mark)",
    "ENUMS_FOUNDATIONTYPE_TYPE_WALLS_OF_ROCK (Murar till berg)",
    "ENUMS_FOUNDATIONTYPE_TYPE_LECA-STONE (Leca-sten)",
    "ENUMS_FOUNDATIONTYPE_TYPE_CARVED_IN_STONE (Huggen sten)",
    "ENUMS_FOUNDATIONTYPE_TYPE_CASTLEROCK (Gråsten)",
    "ENUMS_FOUNDATIONTYPE_TYPE_FOOTINGS (Grundsula)",
    "ENUMS_FOUNDATIONTYPE_TYPE_CONCRETE (Betong)",
    "ENUMS_FOUNDATIONTYPE_TYPE_HOLLOW_FOUNDATION (Krypgrund)"
  ]
}

roofingType T

{
  "name": "roofingType",
  "type": "text",
  "maxLength": 100,
  "enums": [
    "ENUMS_ROOFINGTYPE_TYPE_BRICK (Tegel)",
    "ENUMS_ROOFINGTYPE_TYPE_ROOF (Takpannor)",
    "ENUMS_ROOFINGTYPE_TYPE_TILES (Taktegel)",
    "ENUMS_ROOFINGTYPE_TYPE_SHEET (Plåt)",
    "ENUMS_ROOFINGTYPE_TYPE_PAPP (Papp)",
    "ENUMS_ROOFINGTYPE_TYPE_COPPERPLATE (Kopparplåt)",
    "ENUMS_ROOFINGTYPE_TYPE_ETERNIT (Eternit)",
    "ENUMS_ROOFINGTYPE_TYPE_CONCRETE_TILES (Betongpannor)"
  ]
}

facadeType T

{
  "name": "facadeType",
  "type": "text",
  "enums": [
    "ENUMS_FACADETYPE_TYPE_WOOD (Träfasad)",
    "ENUMS_FACADETYPE_TYPE_BRICK (Tegelstensfasad)",
    "ENUMS_FACADETYPE_TYPE_STANDING_PANELED (Stående träpanel)",
    "ENUMS_FACADETYPE_TYPE_POLISHES (Puts)",
    "ENUMS_FACADETYPE_TYPE_MEXISTEN (Mexisten)",
    "ENUMS_FACADETYPE_TYPE_HORIZONTAL_WOOD_PANELING (Liggande träpanel)",
    "ENUMS_FACADETYPE_TYPE_LIMESTONE (Kalksandsten)",
    "ENUMS_FACADETYPE_TYPE_ETERNIT (Eternit)"
  ]
}

windowsType T

{
  "name": "windowsType",
  "type": "text",
  "maxLength": 100,
  "enums": [
    "ENUMS_WINDOWSTYPE_TYPE_SIMPLE_WINDOW (Enkelglasfönster)",
    "ENUMS_WINDOWSTYPE_TYPE_PAIRED_WINDOWS_WITH_TRANSOMS (Kopplade fönster med spröjs)",
    "ENUMS_WINDOWSTYPE_TYPE_PAIRED_WINDOW (Kopplade fönster)",
    "ENUMS_WINDOWSTYPE_TYPE_LIGHTWEIGHT_WINDOWS_WITH_TRANSOMS (Enkelglasfönster med spröjs)",
    "ENUMS_WINDOWSTYPE_TYPE_GLAZED_WINDOWS_WITH_GLAZING_BARS (Isolerglasfönster med spröjs)",
    "ENUMS_WINDOWSTYPE_TYPE_GLAZED (Isolerglasfönster)",
    "ENUMS_WINDOWSTYPE_TYPE_3-GLAZED_INSULATING (3-glasfönster isoler)",
    "ENUMS_WINDOWSTYPE_TYPE_3-GLASS_WINDOWS_WITH_TRANSOMS (3-glasfönster med spröjs)",
    "ENUMS_WINDOWSTYPE_TYPE_3-GLASS_WINDOW (3-glasfönster)",
    "ENUMS_WINDOWSTYPE_TYPE_2-GLAZED_WINDOWS_WITH_TRANSOMS (2-glasfönster med spröjs)",
    "ENUMS_WINDOWSTYPE_TYPE_2-GLAZED_INSULATING_(SINGLE) (2-glasfönster isoler (enkel))",
    "ENUMS_WINDOWSTYPE_TYPE_2-GLAZED_INSULATING (2-glasfönster isoler)",
    "ENUMS_WINDOWSTYPE_TYPE_2-GLASS_WINDOWS (2-glasfönster)"
  ]
}

joistType T

{
  "name": "joistType",
  "type": "text",
  "maxLength": 100,
  "enums": [
    "ENUMS_JOISTTYPE_TYPE_WOOD (Trä)",
    "ENUMS_JOISTTYPE_TYPE_LIGHTWEIGHT_CONCRETE (Lättbetong)",
    "ENUMS_JOISTTYPE_TYPE_CAST_VAULT (Gjutna valv)",
    "ENUMS_JOISTTYPE_TYPE_CONCRETE (Betong)"
  ]
}

guttersType T

{
  "name": "guttersType",
  "type": "text",
  "maxLength": 100,
  "enums": [
    "ENUMS_GUTTERSTYPE_TYPE_SHEET (Plåt)",
    "ENUMS_GUTTERSTYPE_TYPE_PLASTIC (Plast)",
    "ENUMS_GUTTERSTYPE_TYPE_COPPER (Koppar)",
    "ENUMS_GUTTERSTYPE_TYPE_GALVANIZED_SHEET_METAL_UNPAINTED (Galvaniserad omålad plåt)",
    "ENUMS_GUTTERSTYPE_TYPE_GALVANIZED_PAINTED_PLATE (Galvaniserad målad plåt)"
  ]
}

frameType T

{
  "name": "frameType",
  "type": "text",
  "maxLength": 100,
  "enums": [
    "ENUMS_FRAMETYPE_TYPE_WOOD (Trä)",
    "ENUMS_FRAMETYPE_TYPE_BRICK (Tegel)",
    "ENUMS_FRAMETYPE_TYPE_STEEL (Stål)",
    "ENUMS_FRAMETYPE_TYPE_LIGHTWEIGHT_CONCRETE (Lättbetong)",
    "ENUMS_FRAMETYPE_TYPE_CONCRETE (Betong)"
  ]
}

buildingComment

{
  "name": "buildingComment",
  "type": "text"
}

waterType T

{
  "name": "waterType",
  "type": "text",
  "maxLength": 100,
  "enums": [
    "ENUMS_WATERTYPE_TYPE_WATER_MISSING (Vatten saknas)",
    "ENUMS_WATERTYPE_TYPE_MUNICIPAL_WATER (Kommunalt vatten)",
    "ENUMS_WATERTYPE_TYPE_DUG_WELLS (Grävd brunn)",
    "ENUMS_WATERTYPE_TYPE_INDIVIDUAL_WATER (Enskilt vatten)",
    "ENUMS_WATERTYPE_TYPE_DEEP_DRILLED_WELL (Djupborrad brunn)"
  ]
}

drainType T

{
  "name": "drainType",
  "type": "text",
  "maxLength": 100,
  "enums": [
    "ENUMS_DRAINTYPE_TYPE_SANITATION (Kommunalt avlopp)",
    "ENUMS_DRAINTYPE_TYPE_INDIVIDUAL_SEWAGE (Enskilt avlopp)",
    "ENUMS_DRAINTYPE_TYPE_DRAIN_WITH_INFILTRATION (Avloppsbrunn med infiltration)",
    "ENUMS_DRAINTYPE_TYPE_DRAIN_MISSING (Avlopp saknas)"
  ]
}

heatingType T

{
  "name": "heatingType",
  "type": "text",
  "enums": [
    "ENUMS_HEATINGTYPE_TYPE_COMBI_BOILER_WITH_WOOD_OR_ELECTRICITY (Kombipanna med ved eller el)",
    "ENUMS_HEATINGTYPE_TYPE_COMBI_BOILER_WITH_OIL_OR_ELECTRICITY (Kombipanna med olja eller el)",
    "ENUMS_HEATINGTYPE_TYPE_COMBI_BOILER_WITH_OIL_ELECTRICITY_OR_WOOD (Kombipanna med olja el eller ved)",
    "ENUMS_HEATINGTYPE_TYPE_CERAMIC_TILE_FOR_WOOD (Keramikpanna för ved)",
    "ENUMS_HEATINGTYPE_TYPE_GAS (Gasvärme)",
    "ENUMS_HEATINGTYPE_TYPE_GAS_BOILER (Gaspanna)",
    "ENUMS_HEATINGTYPE_TYPE_DISTRICT_HEATING (Fjärrvärme)",
    "ENUMS_HEATINGTYPE_TYPE_ELECTRICITY-WATER_HEAT (El - vattenburen värme)",
    "ENUMS_HEATINGTYPE_TYPE_EL-AIR_HEATING (El - luftburen värme)",
    "ENUMS_HEATINGTYPE_TYPE_DIRECT_ELECTRIC (Direktverkande el)",
    "ENUMS_HEATINGTYPE_TYPE_HEAT_PUMP (Värmepump)",
    "ENUMS_HEATINGTYPE_TYPE_FIREWOOD (Ved)",
    "ENUMS_HEATINGTYPE_TYPE_OIL-FILLED_ELECTRIC_RADIATORS (Oljefyllda el-element)",
    "ENUMS_HEATINGTYPE_TYPE_OIL (Olja)",
    "ENUMS_HEATINGTYPE_TYPE_PELLET (Pellets)",
    "ENUMS_HEATINGTYPE_TYPE_WOODBURNER (Braskamin)",
    "ENUMS_HEATINGTYPE_TYPE_HEATPUMP_AIR_TO_AIR (Värmepump luft-luft)",
    "ENUMS_HEATINGTYPE_TYPE_HEATPUMP_AIR_TO_WATER (Värmepump luft-vatten)",
    "ENUMS_HEATINGTYPE_TYPE_GEOTHERMAL (Bergvärmepump)"
  ],
  "maxLength": 150
}

heatingPlantAge

{
  "name": "heatingPlantAge",
  "type": "text",
  "maxLength": 40
}

heatingPlantCondition

{
  "name": "heatingPlantCondition",
  "type": "text",
  "maxLength": 100
}

heatingPlantBrand

{
  "name": "heatingPlantBrand",
  "type": "text",
  "maxLength": 40
}

ventilationType T

{
  "name": "ventilationType",
  "type": "text",
  "maxLength": 40,
  "enums": [
    "ENUMS_VENTILATIONTYPE_TYPE_NATURAL_DRAFT (Självdrag)",
    "ENUMS_VENTILATIONTYPE_TYPE_MECHANICAL_SUPPLY_AND_EXHAUST_AIR (Mekanisk till- och frånluft)",
    "ENUMS_VENTILATIONTYPE_TYPE_MECHANICAL_EXHAUST_AIR (Mekanisk frånluft)"
  ]
}

ventilationInspectionDate

{
  "name": "ventilationInspectionDate",
  "type": "date"
}

electricSafety T

{
  "name": "electricSafety",
  "type": "text",
  "maxLength": 50,
  "enums": [
    "ENUMS_ELECTRICSAFETY_TYPE_UNEARTHED (Ojordat)",
    "ENUMS_ELECTRICSAFETY_TYPE_GROUNDED (Jordat)",
    "ENUMS_ELECTRICSAFETY_TYPE_PARTIALLY_GROUNDED (Delvis jordat)"
  ]
}

electricalStemsCondition T

{
  "name": "electricalStemsCondition",
  "type": "text",
  "maxLength": 50,
  "enums": [
    "ENUMS_ELECTRICALSTEMSCONDITION_TYPE_WIRES_NOT_EXCHANGED (Ledningar ej bytta)",
    "ENUMS_ELECTRICALSTEMSCONDITION_TYPE_WIRES_EXCHANGED (Ledningar bytta)"
  ]
}

mainFuse T

{
  "name": "mainFuse",
  "type": "text",
  "maxLength": 10,
  "enums": [
    "ENUMS_MAINFUSE_TYPE_25_A (25 A)",
    "ENUMS_MAINFUSE_TYPE_20_A (20 A)",
    "ENUMS_MAINFUSE_TYPE_16_A (16 A)",
    "ENUMS_MAINFUSE_TYPE_10_A (10 A)"
  ]
}

electricalComment

{
  "name": "electricalComment",
  "type": "text"
}

chimneyType T

{
  "name": "chimneyType",
  "type": "text",
  "maxLength": 40,
  "enums": [
    "ENUMS_CHIMNEYTYPE_TYPE_STACK_OF_PLATES (Skorsten av plåt)",
    "ENUMS_CHIMNEYTYPE_TYPE_BRICK_CHIMNEY_WITH_FLUE_LINER (Murad skorsten med insatsrör)",
    "ENUMS_CHIMNEYTYPE_TYPE_BRICK_CHIMNEY (Murad skorsten)"
  ]
}

chimneyTestedDate

{
  "name": "chimneyTestedDate",
  "type": "date"
}

chimneyComment

{
  "name": "chimneyComment",
  "type": "text"
}

hasRadon bit

{
  "name": "hasRadon",
  "type": "bit"
}

showOnlyCommentInObjectDescription bit  (Only used for building type ENUM_BUILDING_TYPE_ECONOMI)

{
  "name": "showOnlyCommentInObjectDescription",
  "type": "bit",
  "note": "Only used for building type ENUM_BUILDING_TYPE_ECONOMI"
}

showOnlyBuildingCommentInObjectDescription bit  (Only used for building type ENUM_BUILDING_TYPE_HOUSE_FARMING)

{
  "name": "showOnlyBuildingCommentInObjectDescription",
  "type": "bit",
  "note": "Only used for building type ENUM_BUILDING_TYPE_HOUSE_FARMING"
}

parkingDescription

{
  "name": "parkingDescription",
  "type": "text"
}

patioDescription

{
  "name": "patioDescription",
  "type": "text"
}

tvInternetDescription

{
  "name": "tvInternetDescription",
  "type": "text"
}

energyConsumption   (kWh)

{
  "name": "energyConsumption",
  "type": "int",
  "note": "kWh"
}

personsInHousehold

{
  "name": "personsInHousehold",
  "type": "int"
}

heatingCost $$

{
  "name": "heatingCost",
  "type": "money"
}

chimneySweepingCost $$

{
  "name": "chimneySweepingCost",
  "type": "money"
}

waterAndDrainFee $$

{
  "name": "waterAndDrainFee",
  "type": "money"
}

sanitationFee $$

{
  "name": "sanitationFee",
  "type": "money"
}

roadFee $$

{
  "name": "roadFee",
  "type": "money"
}

communityFee $$

{
  "name": "communityFee",
  "type": "money"
}

operatingCostSum $$

{
  "name": "operatingCostSum",
  "type": "money"
}

isOperatingCostSumSetManually bit

{
  "name": "isOperatingCostSumSetManually",
  "type": "bit"
}

energyClass E

{
  "name": "energyClass",
  "type": "enum",
  "enums": [
    "ENUMS_ENERGYCLASS_TYPE_A (A)",
    "ENUMS_ENERGYCLASS_TYPE_B (B)",
    "ENUMS_ENERGYCLASS_TYPE_C (C)",
    "ENUMS_ENERGYCLASS_TYPE_D (D)",
    "ENUMS_ENERGYCLASS_TYPE_E (E)",
    "ENUMS_ENERGYCLASS_TYPE_F (F)",
    "ENUMS_ENERGYCLASS_TYPE_G (G)"
  ]
}

energyStatus E

{
  "name": "energyStatus",
  "type": "enum",
  "enums": [
    "ENUMS_EnergyStatus_TYPE_ENERGY_USE_IS_NOT_NEEDED (Energideklaration behövs ej)",
    "ENUMS_EnergyStatus_TYPE_ENERGY_USE_IS_MADE (Energideklaration är utförd)",
    "ENUMS_EnergyStatus_TYPE_ENERGY_USE_IN_PROGRESS (Energideklaration pågår)",
    "ENUMS_EnergyStatus_TYPE_ENERGY_AUDITS_NOT_PERFORMED (Energideklaration ej utförd)",
    "ENUMS_EnergyStatus_TYPE_ENERGY_AUDITS_ARE_COMMISSIONED (Energideklaration är beställd)"
  ]
}

energyStatusDate

{
  "name": "energyStatusDate",
  "type": "date"
}

energyPerformance

{
  "name": "energyPerformance",
  "type": "int"
}

energyPrimaryPerformance   (kWh/m2, introduced in 2018. sv: primärenergital)

{
  "name": "energyPrimaryPerformance",
  "type": "int",
  "note": "kWh/m2, introduced in 2018. sv: primärenergital"
}

energyStatusEntrepreneur

{
  "name": "energyStatusEntrepreneur",
  "type": "text",
  "maxLength": 200
}

energyStatusDescription

{
  "name": "energyStatusDescription",
  "type": "text"
}

displayOrder

{
  "name": "displayOrder",
  "type": "int"
}

complained

{
  "name": "complained",
  "type": "text",
  "maxLength": 200
}

waterAndDrainComment

{
  "name": "waterAndDrainComment",
  "type": "text"
}

heatingCoolingAndVentilationComment

{
  "name": "heatingCoolingAndVentilationComment",
  "type": "text"
}

radonComment

{
  "name": "radonComment",
  "type": "text"
}

isSanitationMature bit  (If set true it means the building will have 10 or less years left before sanitation is required.)

{
  "name": "isSanitationMature",
  "type": "bit",
  "note": "If set true it means the building will have 10 or less years left before sanitation is required."
}

redevelopmentCost $$

{
  "name": "redevelopmentCost",
  "type": "money"
}

technicalDescription

{
  "name": "technicalDescription",
  "type": "text"
}

livingAreaComment T

{
  "name": "livingAreaComment",
  "type": "text",
  "maxLength": 150,
  "enums": [
    "ENUMS_LIVINGAREACOMMENT_TYPE_NOTE_THAT_THE_EXACT_SIZE_IS_NOT_MEASURED (Arean är uppskattad)",
    "ENUMS_LIVINGAREACOMMENT_TYPE_AREA_INFORMATION_IN_ACCORDANCE_WITH_THE_TAX_INFORMATION (Taxeringsinformationen)",
    "ENUMS_LIVINGAREACOMMENT_TYPE_AREA_INFORMATION_OF_THE_SELLER (Säljaren)",
    "ENUMS_LIVINGAREACOMMENT_TYPE_AREA_INFORMATION_IN_ACCORDANCE_WITH_THE_SELLER_AND_HOUSING_ASSOCIATION (Säljaren och bostadsrättsföreningen)",
    "ENUMS_LIVINGAREACOMMENT_TYPE_AREA_INFORMATION_IN_ACCORDANCE_WITH_DRAWING_(S) (Ritning(ar))",
    "ENUMS_LIVINGAREACOMMENT_TYPE_AREA_INFORMATION_IN_ACCORDANCE_MEASURING (Mätning)",
    "ENUMS_LIVINGAREACOMMENT_TYPE_AREA_INFORMATION_IN_ACCORDANCE_WITH_LANDLORD (Hyresvärden)",
    "ENUMS_LIVINGAREACOMMENT_TYPE_AREA_INFORMATION_IN_ACCORDANCE_WITH_THE_CONDOMINIUM_ASSOCIATION (Bostadsrättsföreningen)",
    "ENUMS_LIVINGAREACOMMENT_TYPE_AREA_INFORMATION_OF_OWNERS_OF (Bostadsföreningen)",
    "ENUMS_LIVINGAREACOMMENT_TYPE_AREA_INFORMATION_NO_MEASURING (Mätning saknas)",
    "ENUMS_LIVINGAREACOMMENT_TYPE_AREA_INFORMATION_IN_ACCORDANCE_WITH_LANTMATERIET (Lantmäteriet)"
  ]
}

operatingCostComment

{
  "name": "operatingCostComment",
  "type": "text"
}

costComment

{
  "name": "costComment",
  "type": "text"
}

isCommercialBuilding bit  (Only used in commercial. To differ a building from a valuation unit)

{
  "name": "isCommercialBuilding",
  "type": "bit",
  "note": "Only used in commercial. To differ a building from a valuation unit"
}

tax $$

{
  "name": "tax",
  "type": "money"
}

isPublic bit  (Only used for farming and commercial buildings. If building should be on webpage)

{
  "name": "isPublic",
  "type": "bit",
  "default": "true",
  "note": "Only used for farming and commercial buildings. If building should be on webpage"
}

isMarketing bit  (Used in commercial. If building should be in object description and so forth)

{
  "name": "isMarketing",
  "type": "bit",
  "default": "true",
  "note": "Used in commercial. If building should be in object description and so forth"
}

updatedDate

{
  "name": "updatedDate",
  "type": "updated"
}

Referenced by

buildingOperatingCosts as buildingId (connection table to amounts via amountId)
buildings as parentId
estateTenants as buildingId