reapit / foundations

Foundations platform mono repo
57 stars 21 forks source link

Support for Material Information Part B & C - Properties API #11087

Open HollyJoyPhillips opened 2 months ago

HollyJoyPhillips commented 2 months ago

Internal Reference: AC-10700

Notes: New table has been added in AC DB to support the requirements for properties to list Material Information (part B & C).

Request: Platform to support surfacing this information in the Properties API

Specification

Add to PropertyModel:

{
  "accessibility": [ --> bitwise field matinfo.access
    "unsuitableForWheelchairs",
    "levelAccess",
    "liftAccess",
    "rampedAccess",
    "wetRoom",
    "wideDoorways",
    "stepFreeAccess",
    "levelAccessShower",
    "lateralLiving"
  ],
  "rightsRestrictions": {
     "listed": true|false -> matinfo.listed
     "restrictions": true|false -> matinfo.restrictions
     "easementsOrWayleaves": true|false -> matinfo.easements
     "rightOfWay": true|false -> matinfo.publicright
  },
  "floodErosion": {
    "floodingLast5Years": true|false -> matinfo.flooded
    "lastFlood": "YYYY-mm-dd", -> matinfo.flooddate
    "floodSources": [ -> bitwise field matinfo.floodsources
      "river", "lake", "sea", "reservoir", "groundwater", "other"
    ],
    "floodDefences": true|false -> matinfo.defences
  },
}

Setup new endpoint specifically for utilities. Bitwise fields should be handled in the same way we handle property attributes

{
     "propertyId": "PRP230001",
    "created": "0000-00-00T00:00:00Z",
    "modified": "0000-00-00T00:00:00Z",
      "gas": {
        "hasGas": true,
        "gasCompanyId": "OXF21000001",
        "gasMeterPoint": "123",    
      },
      "electricity": {
        "type": "windTurbine | mainsSupply | privateSupply | solar", -> matinfo.electricity
    "electricityCompanyId": "OXF21000003",
        "electricityMeterPoint": "789",
      },
      "water": {
        "type": "mainsSupply | privateSupply", -> matinfo.water
    "waterCompanyId": "OXF21000002",
        "waterMeterPoint": "456",
        "sewerage": {
          "type": "mainsSupply | privateSupply" -> matinfo.sewerage
        }
      },
      "internet": { -> bitwise field matinfo.broadtype
        "type": [
          "none",
          "adsl",
          "fttc",
          "fttp"
        ],
        "internetCompanyId": "OXF21000004",
      }, 
      "telephoneCompanyId": "OXF21000006",
      "cableTvCompanyId": "OXF21000005",
      "heating": [ -> bitwise field matinfo.heating (sort alphabatically)
         "airConditioning",
         "central",
         "doubleGlazing",
         "ecoFriendly",
         "electric",
         "gas",
         "gasCentral",
         "nightStorage",
         "oil",
         "solar",
         "solarWater",
         "underFloor",****
         "woodBurner",
         "openFire",
         "biomassBoiler",
         "groundSourceHeatPump",
         "airSourceHeatPump",
         "solarPvThermal",
         "underFloorHeating",****
         "solarThermal",
      ]
    },
    "mobileSignal": "", -> matinfo.mobilesignalinfo varchar(300)
    "_eTag": "XXXYYY123456",
   "_links": {
 "self": {}, 
"property": ""
"telephonyCompany": "",
"cableTvTompany: "", 
"electricityCompany": "",
"gasCompany": "",
"waterCompany": ""
}
}
HollyJoyPhillips commented 1 month ago

Release dependent on customer table upgrades - internal reference TBC