diff --git a/Dockerfile b/Dockerfile
index d31a5ae7e..c114c02b1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,7 @@
# FunderMaps Ecosystem
# Build application solution
-FROM mcr.microsoft.com/dotnet/sdk:5.0-focal AS build
+FROM mcr.microsoft.com/dotnet/sdk AS build
WORKDIR /source
# The subtool must be defined. The build container will only build the
@@ -29,7 +29,7 @@ RUN dotnet publish -c release -o /app \
&& cp /source/contrib/etc/_appsettings.Staging.json /app/appsettings.Staging.json
# Build runtime image
-FROM mcr.microsoft.com/dotnet/aspnet:5.0-focal
+FROM mcr.microsoft.com/dotnet/aspnet
ENV DOTNET_PRINT_TELEMETRY_MESSAGE=false
WORKDIR /app
COPY --from=build /app .
diff --git a/contrib/interface/FunderMaps.WebApi.postman_collection.json b/contrib/interface/FunderMaps.WebApi.postman_collection.json
deleted file mode 100644
index 91e9da14b..000000000
--- a/contrib/interface/FunderMaps.WebApi.postman_collection.json
+++ /dev/null
@@ -1,1503 +0,0 @@
-{
- "info": {
- "_postman_id": "8dc8ba47-b860-4bc2-8b69-63901d248853",
- "name": "FunderMaps.WebApi",
- "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
- },
- "item": [
- {
- "name": "Inquiry",
- "item": [
- {
- "name": "Create Inquiry",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.environment.set(\"inquiry_id\", pm.response.json()[\"id\"])",
- ""
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"DocumentName\": \"{{$randomFileName}}\",\r\n \"Inspection\": {{$randomBoolean}},\r\n \"JointMeasurement\": {{$randomBoolean}},\r\n \"FloorMeasurement\": {{$randomBoolean}},\r\n \"Note\": \"{{$randomLoremSentences}}\",\r\n \"DocumentDate\": \"{{$isoTimestamp}}\",\r\n \"DocumentFile\": \"{{$randomFileName}}\",\r\n \"Type\": 2,\r\n \"StandardF3o\": {{$randomBoolean}},\r\n \"Contractor\": \"11cdc51f-3ba6-4e3c-b975-dfed4f054c31\",\r\n \"Reviewer\": \"9d1b111a-c024-470c-b0b7-6810140924e8\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/inquiry",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "inquiry"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Upload Inquiry Document",
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "formdata",
- "formdata": [
- {
- "key": "input",
- "type": "file",
- "src": "file.pdf"
- }
- ]
- },
- "url": {
- "raw": "{{base_url}}/api/inquiry/upload-document",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "inquiry",
- "upload-document"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Get Inquiry",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/inquiry/{{inquiry_id}}",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "inquiry",
- "{{inquiry_id}}"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Get All Inquiries",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/inquiry",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "inquiry"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Update Inquiry",
- "request": {
- "method": "PUT",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"documentName\": \"{{$randomFileName}}\",\r\n \"inspection\": {{$randomBoolean}},\r\n \"jointMeasurement\": {{$randomBoolean}},\r\n \"floorMeasurement\": {{$randomBoolean}},\r\n \"note\": \"{{$randomLoremSentences}}\",\r\n \"documentDate\": \"{{$isoTimestamp}}\",\r\n \"documentFile\": \"{{$randomFileName}}\",\r\n \"type\": 2,\r\n \"standardF3o\": {{$randomBoolean}},\r\n \"auditStatus\": 0,\r\n \"reviewer\": \"9d1b111a-c024-470c-b0b7-6810140924e8\",\r\n \"contractor\": \"11cdc51f-3ba6-4e3c-b975-dfed4f054c31\",\r\n \"accessPolicy\": 0,\r\n \"createDate\": \"2020-10-07T14:50:57.970056+02:00\",\r\n \"updateDate\": null\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/inquiry/{{inquiry_id}}",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "inquiry",
- "{{inquiry_id}}"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Review Inquiry",
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\n \"Message\": \"{{$randomLoremSentences}}\"\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/inquiry/{{inquiry_id}}/status_review",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "inquiry",
- "{{inquiry_id}}",
- "status_review"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Reject Inquiry",
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\n \"Message\": \"{{$randomLoremSentences}}\"\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/inquiry/{{inquiry_id}}/status_rejected",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "inquiry",
- "{{inquiry_id}}",
- "status_rejected"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Approve Inquiry",
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\n \"Message\": \"{{$randomLoremSentences}}\"\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/inquiry/{{inquiry_id}}/status_approved",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "inquiry",
- "{{inquiry_id}}",
- "status_approved"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Delete Inquiry",
- "request": {
- "method": "DELETE",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/inquiry/{{inquiry_id}}",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "inquiry",
- "{{inquiry_id}}"
- ]
- }
- },
- "response": []
- }
- ]
- },
- {
- "name": "Inquiry Sample",
- "item": [
- {
- "name": "Create Inquiry Sample",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.environment.set(\"inquiry_sample_id\", pm.response.json()[\"id\"])",
- ""
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"Note\": \"{{$randomLoremSentences}}\",\r\n \"Address\": \"{{address_id}}\",\r\n \"BuiltYear\": \"{{$isoTimestamp}}\",\r\n \"Cpt\": \"{{$randomFileName}}\",\r\n \"MonitoringWell\": \"{{$randomFileName}}\",\r\n \"EnforcementTerm\": 9,\r\n \"RecoveryAdvised\": {{$randomBoolean}},\r\n \"WoodQualityNecessity\": {{$randomBoolean}},\r\n \"CrackIndoorRestored\": {{$randomBoolean}},\r\n \"CrackFacadeFrontRestored\": {{$randomBoolean}},\r\n \"CrackFacadeLeftRestored\": {{$randomBoolean}},\r\n \"CrackFacadeRightRestored\": {{$randomBoolean}},\r\n \"DeformedFacade\": {{$randomBoolean}},\r\n \"ThresholdUpdownSkewed\": {{$randomBoolean}}\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/inquiry/{{inquiry_id}}/sample",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "inquiry",
- "{{inquiry_id}}",
- "sample"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Get Inquiry Samples",
- "protocolProfileBehavior": {
- "disableBodyPruning": true
- },
- "request": {
- "method": "GET",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/inquiry/{{inquiry_id}}/sample/{{inquiry_sample_id}}",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "inquiry",
- "{{inquiry_id}}",
- "sample",
- "{{inquiry_sample_id}}"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Get All Samples",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/inquiry/{{inquiry_id}}/sample",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "inquiry",
- "{{inquiry_id}}",
- "sample"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Update Inquiry Sample",
- "request": {
- "method": "PUT",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"address\": \"{{address_id}}\",\r\n \"note\": \"{{$randomLoremSentences}}\",\r\n \"builtYear\": \"{{$isoTimestamp}}\",\r\n \"substructure\": 0,\r\n \"cpt\": null,\r\n \"monitoringWell\": null,\r\n \"groundwaterLevelTemp\": 0,\r\n \"groundLevel\": 0,\r\n \"groundwaterLevelNet\": 0,\r\n \"type\": 0,\r\n \"enforcementTerm\": 0,\r\n \"recoveryAdvised\": false,\r\n \"damageCause\": 0,\r\n \"damageCharacteristics\": 0,\r\n \"constructionPile\": 0,\r\n \"woodType\": 0,\r\n \"woodEncroachement\": 0,\r\n \"constructionLevel\": 0,\r\n \"woodLevel\": 0,\r\n \"pileDiameterTop\": 0,\r\n \"pileDiameterBottom\": 0,\r\n \"pileHeadLevel\": 0,\r\n \"pileTipLevel\": 0,\r\n \"foundationDepth\": 0,\r\n \"masonLevel\": 0,\r\n \"concreteChargerLength\": 0,\r\n \"pileDistanceLength\": 0,\r\n \"woodPenetrationDepth\": 0,\r\n \"overallQuality\": 0,\r\n \"woodQuality\": 0,\r\n \"constructionQuality\": 0,\r\n \"woodCapacityHorizontalQuality\": 0,\r\n \"pileWoodCapacityVerticalQuality\": 0,\r\n \"carryingCapacityQuality\": 0,\r\n \"masonQuality\": 0,\r\n \"woodQualityNecessity\": false,\r\n \"crackIndoorRestored\": false,\r\n \"crackIndoorType\": 0,\r\n \"crackIndoorSize\": 0,\r\n \"crackFacadeFrontRestored\": false,\r\n \"crackFacadeFrontType\": 0,\r\n \"crackFacadeFrontSize\": 0,\r\n \"crackFacadeBackRestored\": false,\r\n \"crackFacadeBackType\": 0,\r\n \"crackFacadeBackSize\": 0,\r\n \"crackFacadeLeftRestored\": false,\r\n \"crackFacadeLeftType\": 0,\r\n \"crackFacadeLeftSize\": 0,\r\n \"crackFacadeRightRestored\": false,\r\n \"crackFacadeRightType\": 0,\r\n \"crackFacadeRightSize\": 0,\r\n \"deformedFacade\": false,\r\n \"thresholdUpdownSkewed\": false,\r\n \"thresholdFrontLevel\": 0,\r\n \"thresholdBackLevel\": 0,\r\n \"skewedParallel\": 0,\r\n \"skewedPerpendicular\": 0,\r\n \"skewedFacade\": 0,\r\n \"settlementSpeed\": 0,\r\n \"createDate\": \"2020-10-07T15:33:17.709187+02:00\",\r\n \"updateDate\": null,\r\n \"deleteDate\": null\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/inquiry/{{inquiry_id}}/sample/{{inquiry_sample_id}}",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "inquiry",
- "{{inquiry_id}}",
- "sample",
- "{{inquiry_sample_id}}"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Delete Inquiry Sample",
- "request": {
- "method": "DELETE",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/inquiry/{{inquiry_id}}/sample/{{inquiry_sample_id}}",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "inquiry",
- "{{inquiry_id}}",
- "sample",
- "{{inquiry_sample_id}}"
- ]
- }
- },
- "response": []
- }
- ],
- "event": [
- {
- "listen": "prerequest",
- "script": {
- "type": "text/javascript",
- "exec": [
- ""
- ]
- }
- },
- {
- "listen": "test",
- "script": {
- "type": "text/javascript",
- "exec": [
- ""
- ]
- }
- }
- ]
- },
- {
- "name": "Recovery",
- "item": [
- {
- "name": "Create Recovery",
- "event": [
- {
- "listen": "prerequest",
- "script": {
- "exec": [
- "pm.globals.set('randomRecoveryType', _.random(0, 4));\r",
- "\r",
- "const zeroPad = (num, places) => String(num).padStart(places, '0')\r",
- "pm.globals.set('randomDateTime', `${_.random(1970, 2020)}-${zeroPad(_.random(1,12), 2)}-${zeroPad(_.random(1,28), 2)}`);"
- ],
- "type": "text/javascript"
- }
- },
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.environment.set(\"recovery_id\", pm.response.json()[\"id\"])\r",
- ""
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"note\": \"{{$randomLoremSentences}}\",\r\n \"documentDate\": \"{{randomDateTime}}\",\r\n \"documentFile\": \"{{$randomCommonFileName}}\",\r\n \"type\": {{randomRecoveryType}},\r\n \"attribution\": 207\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/recovery",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "recovery"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Get Recovery",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/recovery/{{recovery_id}}",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "recovery",
- "{{recovery_id}}"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Get Recovery Document",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/recovery/{{recovery_id}}/download",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "recovery",
- "{{recovery_id}}",
- "download"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Get All Recovery",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/recovery",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "recovery"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Update Recovery",
- "event": [
- {
- "listen": "prerequest",
- "script": {
- "exec": [
- "pm.globals.set('randomRecoveryType', _.random(0, 4));\r",
- "\r",
- "const zeroPad = (num, places) => String(num).padStart(places, '0')\r",
- "pm.globals.set('randomDateTime', `${_.random(1970, 2020)}-${zeroPad(_.random(1,12), 2)}-${zeroPad(_.random(1,28), 2)}`);"
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "PUT",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"note\": \"{{$randomLoremSentences}}\",\r\n \"documentDate\": \"{{randomDateTime}}\",\r\n \"documentFile\": \"3516cbe8-c70a-47ef-8d85-30139b972c28.txt\",\r\n \"type\": {{randomRecoveryType}},\r\n \"attribution\": 1,\r\n \"accessPolicy\": 1,\r\n \"createDate\": \"{{randomDateTime}}\",\r\n \"updateDate\": null,\r\n \"deleteDate\": null\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/recovery/{{recovery_id}}",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "recovery",
- "{{recovery_id}}"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Delete Recovery",
- "request": {
- "method": "DELETE",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/recovery/{{recovery_id}}",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "recovery",
- "{{recovery_id}}"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Upload Recovery Document",
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "formdata",
- "formdata": [
- {
- "key": "input",
- "type": "file",
- "src": "file.pdf"
- }
- ]
- },
- "url": {
- "raw": "{{base_url}}/api/recovery/upload-document",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "recovery",
- "upload-document"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Get Recovery Stats",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/recovery/4",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "recovery",
- "4"
- ]
- }
- },
- "response": []
- }
- ]
- },
- {
- "name": "Recovery Sample",
- "item": [
- {
- "name": "Create Recovery Sample",
- "event": [
- {
- "listen": "prerequest",
- "script": {
- "exec": [
- "pm.globals.set('randomRecoveryType', _.random(0, 4));\r",
- "\r",
- "const zeroPad = (num, places) => String(num).padStart(places, '0')\r",
- "pm.globals.set('randomDateTime', `${_.random(1970, 2020)}-${zeroPad(_.random(1,12), 2)}-${zeroPad(_.random(1,28), 2)}`);"
- ],
- "type": "text/javascript"
- }
- },
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.environment.set(\"recovery_sample_id\", pm.response.json()[\"id\"])\r",
- ""
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"note\": \"{{$randomLoremSentences}}\",\r\n \"address\": \"gfm-00000163c7e04fa9a562688df1e077b9\",\r\n \"permit\": \"{{$randomBsBuzz}}\",\r\n \"permitDate\": \"{{randomDateTime}}\",\r\n \"recoveryDate\": \"{{randomDateTime}}\",\r\n \"facade\": []\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/recovery/{{recovery_id}}/sample",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "recovery",
- "{{recovery_id}}",
- "sample"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Get Recovery Sample",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/recovery/2/sample/3",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "recovery",
- "2",
- "sample",
- "3"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Get Recovery Sample Stats",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/recovery/4",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "recovery",
- "4"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Update Recovery Sample",
- "event": [
- {
- "listen": "prerequest",
- "script": {
- "exec": [
- "const zeroPad = (num, places) => String(num).padStart(places, '0')\r",
- "const facades = [];\r",
- "for (var i = 0; i < _.random(0,10); i++) {\r",
- " facades.push(_.random(0,3));\r",
- "}\r",
- "\r",
- "pm.globals.set('randomRecoveryType', _.random(0, 4));\r",
- "pm.globals.set('randomDateTime', `${_.random(1970, 2020)}-${zeroPad(_.random(1,12), 2)}-${zeroPad(_.random(1,28), 2)}`);\r",
- "pm.globals.set('randomRecoveryDate', `${_.random(1970, 2020)}-${zeroPad(_.random(1,12), 2)}-${zeroPad(_.random(1,28), 2)}`);\r",
- "pm.globals.set('randomFacadeArray', facades);\r",
- "pm.globals.set('randomPileType', _.random(0, 2));\r",
- "pm.globals.set('ramdomRecoveryType', _.random(0, 5));\r",
- "pm.globals.set('randomRecoveryStatus', _.random(0, 2));\r",
- "\r",
- ""
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "PUT",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"note\": \"{{$randomLoremSentences}}\",\r\n \"address\": \"gfm-91f5141a92fa485f9a2d39c1c12b5390\",\r\n \"status\": {{randomRecoveryStatus}},\r\n \"permit\": \"{{$randomBsBuzz}}\",\r\n \"permitDate\": \"{{randomDateTime}}\",\r\n \"recoveryDate\": \"{{randomRecoveryDate}}\",\r\n \"facade\": [{{randomFacadeArray}}],\r\n \"pileType\": {{randomPileType}},\r\n \"type\": {{randomRecoveryType}}\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/recovery/{{recovery_id}}/sample/{{recovery_sample_id}}",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "recovery",
- "{{recovery_id}}",
- "sample",
- "{{recovery_sample_id}}"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Delete Recovery Sample",
- "request": {
- "method": "DELETE",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/recovery/{{recovery_id}}",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "recovery",
- "{{recovery_id}}"
- ]
- }
- },
- "response": []
- }
- ]
- },
- {
- "name": "Incident",
- "item": [
- {
- "name": "Create Incident",
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"Name\": \"{{$randomFullName}}\",\r\n \"ClientId\": 3,\r\n \"Email\": \"{{$randomEmail}}\",\r\n \"PhoneNumber\": \"06360557722\",\r\n \"FoundationType\": 5,\r\n \"Address\": \"gfm-00000163c7e04fa9a562688df1e077b9\",\r\n \"FoundationDamageCharacteristics\": [\r\n 1,\r\n 3\r\n ],\r\n \"EnvironmentDamageCharacteristics\": [\r\n 1\r\n ],\r\n \"Owner\": {{$randomBoolean}},\r\n \"FoundationRecovery\": {{$randomBoolean}},\r\n \"NeighborRecovery\": {{$randomBoolean}},\r\n \"FoundationDamageCause\": 6,\r\n \"DocumentFile\": [\r\n \"{{$randomFileName}}\"\r\n ],\r\n \"Note\": \"{{$randomLoremSentences}}\",\r\n \"InternalNote\": \"{{$randomLoremSentences}}\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/incident",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "incident"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Get Incident",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/incident/FIR122020-12570",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "incident",
- "FIR122020-12570"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Get All Incidents",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/incident?limit=5",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "incident"
- ],
- "query": [
- {
- "key": "limit",
- "value": "5"
- }
- ]
- }
- },
- "response": []
- },
- {
- "name": "Update Incident",
- "request": {
- "method": "PUT",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"id\": \"FIR032020-12600\",\r\n \"clientId\": 3,\r\n \"foundationType\": 5,\r\n \"chainedBuilding\": {{$randomBoolean}},\r\n \"owner\": {{$randomBoolean}},\r\n \"foundationRecovery\": {{$randomBoolean}},\r\n \"neighborRecovery\": {{$randomBoolean}},\r\n \"foundationDamageCause\": 6,\r\n \"documentFile\": [\r\n \"https://somefile.ext\"\r\n ],\r\n \"note\": \"{{$randomLoremSentences}}\",\r\n \"internalNote\": \"{{$randomLoremSentences}}\",\r\n \"auditStatus\": 0,\r\n \"questionType\": 0,\r\n \"foundationDamageCharacteristics\": [\r\n 1,\r\n 3\r\n ],\r\n \"environmentDamageCharacteristics\": [\r\n 1\r\n ],\r\n \"email\": \"Kaylah.Wehner@yahoo.com\",\r\n \"name\": \"{{$randomFullName}}\",\r\n \"phoneNumber\": \"06360557722\",\r\n \"address\": \"gfm-00000163c7e04fa9a562688df1e077b9\",\r\n \"createDate\": \"2020-09-08T13:54:53.269121+00:00\",\r\n \"updateDate\": null,\r\n \"deleteDate\": null\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/incident/FIR122020-12570",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "incident",
- "FIR122020-12570"
- ]
- }
- },
- "response": []
- }
- ]
- },
- {
- "name": "Portal",
- "item": [
- {
- "name": "Create Incident",
- "request": {
- "auth": {
- "type": "noauth"
- },
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"Name\": \"{{$randomFullName}}\",\r\n \"ClientId\": 3,\r\n \"Email\": \"{{$randomEmail}}\",\r\n \"PhoneNumber\": \"06360557722\",\r\n \"FoundationType\": 5,\r\n \"Address\": \"gfm-00000163c7e04fa9a562688df1e077b9\",\r\n \"FoundationDamageCharacteristics\": [\r\n 1,\r\n 3\r\n ],\r\n \"EnvironmentDamageCharacteristics\": [\r\n 1\r\n ],\r\n \"Owner\": {{$randomBoolean}},\r\n \"FoundationRecovery\": {{$randomBoolean}},\r\n \"NeighborRecovery\": {{$randomBoolean}},\r\n \"FoundationDamageCause\": 6,\r\n \"DocumentFile\": [\r\n \"https://somefile.ext\"\r\n ],\r\n \"Note\": \"{{$randomLoremSentences}}\",\r\n \"InternalNote\": \"{{$randomLoremSentences}}\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/incident-portal/submit",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "incident-portal",
- "submit"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Get Address Suggestions",
- "request": {
- "auth": {
- "type": "noauth"
- },
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/incident-portal/address-suggest?query=2628XG&limit=10",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "incident-portal",
- "address-suggest"
- ],
- "query": [
- {
- "key": "query",
- "value": "2628XG"
- },
- {
- "key": "limit",
- "value": "10"
- }
- ]
- }
- },
- "response": []
- },
- {
- "name": "Upload Incident Document",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Status code is 200\", function () {",
- " pm.response.to.have.status(200);",
- "});",
- "pm.test(\"Body matches string\", function () {",
- " pm.expect(pm.response.text()).to.include(\"name\");",
- "});"
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "auth": {
- "type": "noauth"
- },
- "method": "POST",
- "header": [],
- "body": {
- "mode": "formdata",
- "formdata": [
- {
- "key": "input",
- "type": "file",
- "src": "/home/yorick/Downloads/dummy.pdf"
- }
- ]
- },
- "url": {
- "raw": "{{base_url}}/api/incident-portal/upload-document",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "incident-portal",
- "upload-document"
- ]
- }
- },
- "response": []
- }
- ]
- },
- {
- "name": "Address",
- "item": [
- {
- "name": "Get Suggestions",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "if (pm.response.json().length > 0) {",
- " pm.environment.set(\"address_id\", pm.response.json()[0][\"id\"])",
- "}"
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/address/suggest?query=3123EB&limit=20",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "address",
- "suggest"
- ],
- "query": [
- {
- "key": "query",
- "value": "3123EB"
- },
- {
- "key": "limit",
- "value": "20"
- }
- ]
- }
- },
- "response": []
- },
- {
- "name": "Get address",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/address/{{address_id}}",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "address",
- "{{address_id}}"
- ]
- }
- },
- "response": []
- }
- ]
- },
- {
- "name": "User",
- "item": [
- {
- "name": "Get Current User",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/user",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "user"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Update Current User",
- "request": {
- "method": "PUT",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"id\": \"407988e2-e80c-4edd-85ab-2469c8beb15d\",\r\n \"givenName\": \"{{$randomFirstName}}\",\r\n \"lastName\": \"{{$randomLastName}}\",\r\n \"email\": \"{{username}}\",\r\n \"avatar\": null,\r\n \"jobTitle\": \"{{$randomJobTitle}}\",\r\n \"phoneNumber\": \"067634283\",\r\n \"role\": 1\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/user",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "user"
- ]
- }
- },
- "response": []
- }
- ]
- },
- {
- "name": "Organization",
- "item": [
- {
- "name": "Organization Setup",
- "request": {
- "method": "POST",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/organization/setup",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "organization",
- "setup"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Get Current Organization [Session]",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/organization",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "organization"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Update Current Organization [Session]",
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"givenName\": \"{{$randomFirstName}}\",\r\n \"lastName\": \"{{$randomLastName}}\",\r\n \"email\": \"{{username}}\",\r\n \"avatar\": null,\r\n \"jobTitle\": \"{{$randomJobTitle}}\",\r\n \"phoneNumber\": null\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/organization/user",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "organization",
- "user"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Create Organization [Admin]",
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"name\": \"Starbucks\",\r\n \"email\": \"info@starbucks.com\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/organization",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "organization"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Organization Setup [Anon]",
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"email\": \"{{username}}\",\r\n \"password\": \"{{password}}\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/organization/11cdc51f-3ba6-4e3c-b975-dfed4f054c31/setup",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "organization",
- "11cdc51f-3ba6-4e3c-b975-dfed4f054c31",
- "setup"
- ]
- }
- },
- "response": []
- }
- ]
- },
- {
- "name": "Auth",
- "item": [
- {
- "name": "SignIn",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Status code is 200\", function () {",
- " pm.response.to.have.status(200);",
- "});",
- "var jsonData = JSON.parse(responseBody);",
- "pm.environment.set(\"bearer_token\", jsonData.token);"
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"Email\": \"{{username}}\",\r\n \"Password\": \"{{password}}\"\r\n}\r\n",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{base_url}}/api/auth/signin",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "auth",
- "signin"
- ]
- }
- },
- "response": []
- },
- {
- "name": "Refresh Token",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Status code is 200\", function () {",
- " pm.response.to.have.status(200);",
- "});",
- "var jsonData = JSON.parse(responseBody);",
- "pm.environment.set(\"bearer_token\", jsonData.token);"
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/auth/token-refresh",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "auth",
- "token-refresh"
- ]
- }
- },
- "response": []
- }
- ]
- },
- {
- "name": "Layer",
- "item": [
- {
- "name": "Get Layer",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/layer/{{layer_id}}",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "layer",
- "{{layer_id}}"
- ]
- },
- "description": "Returns layer by id"
- },
- "response": []
- },
- {
- "name": "Get All Layers",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/layer",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "layer"
- ]
- },
- "description": "Returns all layers"
- },
- "response": []
- }
- ]
- },
- {
- "name": "Bundle",
- "item": [
- {
- "name": "Get All Bundles",
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/bundle",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "bundle"
- ]
- },
- "description": "Gets all the bundles (scoped to organization)"
- },
- "response": []
- }
- ]
- },
- {
- "name": "Get Version",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Status code is 200\", function () {",
- " pm.response.to.have.status(200);",
- "});",
- "pm.test(\"Your test name\", function () {",
- " var jsonData = pm.response.json();",
- " pm.expect(jsonData.name).to.eql('FunderMaps');",
- "});"
- ],
- "type": "text/javascript"
- }
- }
- ],
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{base_url}}/api/version",
- "host": [
- "{{base_url}}"
- ],
- "path": [
- "api",
- "version"
- ]
- }
- },
- "response": []
- }
- ],
- "auth": {
- "type": "bearer",
- "bearer": [
- {
- "key": "token",
- "value": "{{bearer_token}}",
- "type": "string"
- }
- ]
- },
- "event": [
- {
- "listen": "prerequest",
- "script": {
- "type": "text/javascript",
- "exec": [
- ""
- ]
- }
- },
- {
- "listen": "test",
- "script": {
- "type": "text/javascript",
- "exec": [
- ""
- ]
- }
- }
- ],
- "variable": [
- {
- "key": "base_url",
- "value": ""
- },
- {
- "key": "bearer_token",
- "value": ""
- }
- ]
-}
\ No newline at end of file
diff --git a/database/data/seed_application.sql b/database/data/seed_application.sql
index e553759b7..8eb7c9f75 100644
--- a/database/data/seed_application.sql
+++ b/database/data/seed_application.sql
@@ -31,12 +31,13 @@ COPY application.organization (id, name, normalized_name, email, phone_number, b
-- Data for Name: user; Type: TABLE DATA; Schema: application; Owner: fundermaps
--
-COPY application."user" (id, given_name, last_name, email, normalized_email, email_confirmed, avatar, job_title, password_hash, phone_number, two_factor_enabled, lockout_end, access_failed_count, role, last_login, login_count, phone_number_confirmed) FROM stdin;
-eda54685-a2c1-4d0e-98d8-d63faccc8a9f Administrator \N admin@fundermaps.com ADMIN@FUNDERMAPS.COM f \N Administrator AcoX6S+JSGn42iAC48JcoKYmWDUjWpb9jgbY92QvK9jTpU3G2EvFZNiU3rMUgHQ16g== \N f \N 0 administrator \N 0 f
-ff1ee265-29aa-4eff-beb1-cf02609a909c \N \N Javier40@yahoo.com JAVIER40@YAHOO.COM f \N \N AcoX6S+JSGn42iAC48JcoKYmWDUjWpb9jgbY92QvK9jTpU3G2EvFZNiU3rMUgHQ16g== \N f \N 0 user \N 0 f
-21c403fe-45fc-4106-9551-3aada1bbdec3 \N Kihn Freda@contoso.com FREDA@CONTOSO.COM f \N soldier AcoX6S+JSGn42iAC48JcoKYmWDUjWpb9jgbY92QvK9jTpU3G2EvFZNiU3rMUgHQ16g== 80186700424 f \N 0 user \N 0 f
-1a93cfb3-f097-4697-a998-71cdd9cfaead Lester Bednar lester@contoso.com LESTER@CONTOSO.COM f https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/373.jpg actor AcoX6S+JSGn42iAC48JcoKYmWDUjWpb9jgbY92QvK9jTpU3G2EvFZNiU3rMUgHQ16g== 55505763052 f \N 0 user \N 0 f
-aadc6b80-b447-443b-b4ed-fdfcb00976f2 Patsy Brekke patsy@contoso.com PATSY@CONTOSO.COM f \N decorator AcoX6S+JSGn42iAC48JcoKYmWDUjWpb9jgbY92QvK9jTpU3G2EvFZNiU3rMUgHQ16g== 59539557702 f \N 0 user \N 0 f
+COPY application."user" (id, given_name, last_name, email, normalized_email, email_confirmed, avatar, job_title, password_hash, phone_number, two_factor_enabled, access_failed_count, role, last_login, login_count, phone_number_confirmed) FROM stdin;
+eda54685-a2c1-4d0e-98d8-d63faccc8a9f Administrator \N admin@fundermaps.com ADMIN@FUNDERMAPS.COM f \N Administrator AcoX6S+JSGn42iAC48JcoKYmWDUjWpb9jgbY92QvK9jTpU3G2EvFZNiU3rMUgHQ16g== \N f 0 administrator \N 0 f
+ff1ee265-29aa-4eff-beb1-cf02609a909c \N \N Javier40@yahoo.com JAVIER40@YAHOO.COM f \N \N AcoX6S+JSGn42iAC48JcoKYmWDUjWpb9jgbY92QvK9jTpU3G2EvFZNiU3rMUgHQ16g== \N f 0 user \N 0 f
+21c403fe-45fc-4106-9551-3aada1bbdec3 \N Kihn Freda@contoso.com FREDA@CONTOSO.COM f \N soldier AcoX6S+JSGn42iAC48JcoKYmWDUjWpb9jgbY92QvK9jTpU3G2EvFZNiU3rMUgHQ16g== 80186700424 f 0 user \N 0 f
+1a93cfb3-f097-4697-a998-71cdd9cfaead Lester Bednar lester@contoso.com LESTER@CONTOSO.COM f https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/373.jpg actor AcoX6S+JSGn42iAC48JcoKYmWDUjWpb9jgbY92QvK9jTpU3G2EvFZNiU3rMUgHQ16g== 55505763052 f 0 user \N 0 f
+aadc6b80-b447-443b-b4ed-fdfcb00976f2 Patsy Brekke patsy@contoso.com PATSY@CONTOSO.COM f \N decorator AcoX6S+JSGn42iAC48JcoKYmWDUjWpb9jgbY92QvK9jTpU3G2EvFZNiU3rMUgHQ16g== 59539557702 f 0 user \N 0 f
+ab403d16-e428-4a75-9eec-3dd08b294988 \N \N corene@contoso.com CORENE@CONTOSO.COM f \N \N AcoX6S+JSGn42iAC48JcoKYmWDUjWpb9jgbY92QvK9jTpU3G2EvFZNiU3rMUgHQ16g== \N f 0 user \N 0 f
\.
@@ -81,6 +82,7 @@ ff1ee265-29aa-4eff-beb1-cf02609a909c 05203318-6c55-43c1-a6a6-bb8c83f930c3 superu
21c403fe-45fc-4106-9551-3aada1bbdec3 05203318-6c55-43c1-a6a6-bb8c83f930c3 verifier
aadc6b80-b447-443b-b4ed-fdfcb00976f2 05203318-6c55-43c1-a6a6-bb8c83f930c3 writer
1a93cfb3-f097-4697-a998-71cdd9cfaead 05203318-6c55-43c1-a6a6-bb8c83f930c3 reader
+ab403d16-e428-4a75-9eec-3dd08b294988 05203318-6c55-43c1-a6a6-bb8c83f930c3 reader
\.
diff --git a/database/data/seed_maplayer.sql b/database/data/seed_maplayer.sql
index 7fe44f4e6..dc24f9844 100644
--- a/database/data/seed_maplayer.sql
+++ b/database/data/seed_maplayer.sql
@@ -21,6 +21,7 @@ SET row_security = off;
--
COPY maplayer.bundle (id, organization_id, name, create_date, update_date, delete_date, layer_configuration) FROM stdin;
+a1537d6c-71c1-483b-978f-103450b9345e 05203318-6c55-43c1-a6a6-bb8c83f930c3 Gebouw 2021-03-26 09:05:29.2066+00 \N \N {"Layers": [{"LayerId": "c7ccf095-cf77-4f41-813a-68b493f7c6cb", "ColumnNames": ["id", "built_year", "geom"]}, {"LayerId": "782bc8e1-ff0f-48aa-9f0d-10232392ceda", "ColumnNames": ["id", "building_height", "geom"]}, {"LayerId": "22bcc8a3-fd28-4184-822b-f66e3e79e4b7", "ColumnNames": ["id", "velocity", "geom"]}, {"LayerId": "806d560e-2931-46d9-a06b-644491a335e8", "ColumnNames": ["id", "owner", "geom"]}]}
\.
@@ -37,7 +38,6 @@ c7ccf095-cf77-4f41-813a-68b493f7c6cb maplayer building_built_year Bouwjaar {"typ
5742df10-53fe-44da-b449-2c0c926deab6 maplayer incident Meldingen {"type": "color", "column": "meldingen123kleurtest", "values": {"color": "#bd6495"}}
307e6489-feb3-4be8-919c-4b5392fee8fb maplayer inquiry_sample_enforcement_term Handhavingstermijn (jaar) {"type": "range_num", "column": "enforcement_term", "values": [{"max": "100", "min": "25", "color": "#64DEBC", "label": "> 25"}, {"max": "25", "min": "20", "color": "#55E293", "label": "20 t/m 25"}, {"max": "20", "min": "15", "color": "#46E65F", "label": "15 t/m 20"}, {"max": "15", "min": "10", "color": "#4CEB36", "label": "10 t/m 15"}, {"max": "10", "min": "5", "color": "#77F025", "label": "5 t/m 10"}, {"max": "5", "min": "0", "color": "#AEF614", "label": "0 t/m 5"}, {"max": "0", "min": "-5", "color": "#D0E218", "label": " 0 t/m -5"}, {"max": "-5", "min": "-10", "color": "#CEB31B", "label": "-5 t/m -10"}, {"max": "-10", "min": "-15", "color": "#BB7F1E", "label": "-10 t/m -15"}, {"max": "-15", "min": "-20", "color": "#A85520", "label": "-15 t/m -20"}, {"max": "-20", "min": "-25", "color": "#973321", "label": "-20 t/m -25"}, {"max": "-25", "min": "-100", "color": "#86222A", "label": "< -25"}]}
75709b4f-d82e-4d62-9be3-07cb2ca00cec maplayer inquiry_sample_damage_cause Oorzaak Schade {"type": "case_multimatch", "column": "damage_cause", "values": [{"color": "#55B5A7", "label": "Ontwateringsdiepte", "match": ["drainage"]}, {"color": "#4B8FBF", "label": "Overbelasting", "match": ["overcharge"]}, {"color": "#4145C9", "label": "Bacteriële aantasting", "match": ["bio_fungus_infection", "bio_infection"]}, {"color": "#8936D4", "label": "Schimmelaantasting", "match": ["fungus_infection", "drystand", "bio_fungus_infection"]}, {"color": "#DE2CCF", "label": "Bodemdaling", "match": ["subsidence"]}, {"color": "#D2386F", "label": "Planten en wortels", "match": ["vegetation"]}, {"color": "#C75D43", "label": "Aardbeving", "match": ["gas", "vibrations"]}, {"color": "#BBA14F", "label": "Partieel funderingsherstel", "match": ["partial_foundation_recovery"]}, {"color": "#95B05A", "label": "Constructiefout", "match": ["construction_flaw", "foundation_flaw", "construction_heave"]}, {"color": "#6EA466", "label": "Negatieve kleef", "match": ["negative_cling", "overcharge_negative_cling"]}, {"color": "#6A6C70", "label": "Onbekend", "match": ["unknown"]}]}
-782bc8e1-ff0f-48aa-9f0d-10232392ceda maplayer building_height Gebouwhoogte (Beta) \N
8beee1ea-9cd5-4999-8759-02e4cf313bd9 maplayer building_hotspot Hotspots {"type": "color", "column": "meldingen123kleurtest", "values": {"color": "#d11313"}}
16cc1db0-5f09-4673-9e07-e5ac573fc1b7 maplayer foundation_indicative Funderingstype Indicatief {"type": "case_multimatch", "column": "foundation_type", "values": [{"color": "#c75d43", "label": "Houten paal", "match": ["wood", "wood_rotterdam", "wood_amsterdam"]}, {"color": "#deb271", "label": "Houten paal met oplanger", "match": ["wood_charger"]}, {"color": "#6a6c70", "label": "Betonnen paal", "match": ["concrete"]}, {"color": "#ff3333", "label": "Op staal", "match": ["no_pile", "no_pile_masonry", "no_pile_strips", "no_pile_concrete_floor", "no_pile_slit", "no_pile_bearing_floor"]}]}
806d560e-2931-46d9-a06b-644491a335e8 maplayer building_ownership Eigendom {"type": "color", "column": "meldingen123kleurtest", "values": {"color": "#d11313"}}
@@ -46,6 +46,7 @@ e0519b1a-ae1a-43ad-a2b9-bdbbeb0c5f86 maplayer incident_aggregate_category Incide
dfe1a361-c23f-4a1d-ba49-af8e974270b3 maplayer subsidence_hex Maaiveldzakking {"type": "range_num", "column": "velocity", "values": [{"max": "9999", "min": "0", "color": "#f7fbff", "label": "> 0 mm/jaar"}, {"max": "0", "min": "-0.5", "color": "#d8e7f5", "label": "0,0 t/m -0,5 mm/jaar"}, {"max": "-0.5", "min": "-1", "color": "#b0d2e8", "label": "-0,5 t/m -1,0 mm/jaar"}, {"max": "-1", "min": "-1.5", "color": "#73b3d8", "label": "-1,0 t/m -1,5 mm/jaar"}, {"max": "-1.5", "min": "-2", "color": "#3e8ec4", "label": "-1,5 t/m -2,0 mm/jaar"}, {"max": "-2", "min": "-2.5", "color": "#1563aa", "label": "-2,0 t/m -2,5 mm/jaar"}, {"max": "-2.5", "min": "-9999", "color": "#08306b", "label": "< -2,5 mm/jaar"}]}
f42a6826-c3a0-48b1-8c96-6c9ef753ed46 maplayer inquiry_sample_foundation_type Funderingstype vastgesteld {"type": "case_multimatch", "column": "foundation_type", "values": [{"color": "#c75d43", "label": "Houten paal", "match": ["wood", "weighted_pile", "wood_amsterdam", "wood_rotterdam"]}, {"color": "#deb271", "label": "Houten paal met oplanger", "match": ["wood_charger"]}, {"color": "#6a6c70", "label": "Betonnen paal", "match": ["concrete"]}, {"color": "#ff3333", "label": "Op staal", "match": ["no_pile", "no_pile_masonry", "no_pile_strips", "no_pile_concrete_floor", "no_pile_slit", "no_pile_bearing_floor"]}, {"color": "#bdbebf", "label": "Stalen paal", "match": ["steel_pile"]}, {"color": "#7192de", "label": "Verzwaarde betonpuntpaal", "match": ["weighted_pile"]}, {"color": "#b271de", "label": "Combinatie", "match": ["combined"]}, {"color": "#ffec33", "label": "Overig", "match": ["other"]}, {"color": "#71decc", "label": "Onbekend", "match": ["unknown"]}]}
9dffd130-4019-4440-b3d5-8812a961a87a maplayer recovery_sample_type Hesteld {"type": "case_multimatch", "column": "type", "values": [{"color": "#5cbe55", "label": "Volledig herstel", "match": ["table"]}, {"color": "#47baa5", "label": "Partieel herstel", "match": ["pile_in_wall"]}, {"color": "#8c4bb6", "label": "Paalkop verlaging", "match": ["pile_lowering", "beam_on_pile"]}, {"color": "#c67e70", "label": "Grondverbetering", "match": ["injection"]}, {"color": "#5B4AB7", "label": "Onbekend", "match": ["unknown"]}]}
+782bc8e1-ff0f-48aa-9f0d-10232392ceda maplayer building_height Gebouwhoogte (Beta) {"type": "range_num", "column": "building_height", "values": [{"max": "5", "min": "0", "color": "#f7fbff", "label": "< 5m"}, {"max": "7", "min": "5", "color": "#d8e7f5", "label": "5 t/m 7m"}, {"max": "9", "min": "7", "color": "#b0d2e8", "label": "7 t/m 9m"}, {"max": "11", "min": "9", "color": "#73b3d8", "label": "9 t/m 11m"}, {"max": "13", "min": "11", "color": "#3e8ec4", "label": "11 t/m 13m"}, {"max": "15", "min": "13", "color": "#1563aa", "label": "13 t/m 15m"}, {"max": "17", "min": "15", "color": "#08306b", "label": "15 t/m 17m"}, {"max": "9999", "min": "17", "color": "#031229", "label": "> 17m"}]}
\.
diff --git a/database/data/seed_report.sql b/database/data/seed_report.sql
index 564e3b217..727928241 100644
--- a/database/data/seed_report.sql
+++ b/database/data/seed_report.sql
@@ -47,22 +47,6 @@ COPY report.inquiry_sample (id, inquiry, address, create_date, update_date, dele
\.
---
--- Data for Name: project; Type: TABLE DATA; Schema: report; Owner: fundermaps
---
-
-COPY report.project (id, dossier, note, start_date, end_date, create_date, update_date, delete_date, adviser, creator, lead) FROM stdin;
-\.
-
-
---
--- Data for Name: project_sample; Type: TABLE DATA; Schema: report; Owner: fundermaps
---
-
-COPY report.project_sample (id, project, create_date, update_date, delete_date, note, status, contact, address) FROM stdin;
-\.
-
-
--
-- Data for Name: recovery; Type: TABLE DATA; Schema: report; Owner: fundermaps
--
@@ -104,20 +88,6 @@ SELECT pg_catalog.setval('report.inquiry_id_seq', 10000, false);
SELECT pg_catalog.setval('report.inquiry_sample_id_seq', 10000, false);
---
--- Name: project_id_seq; Type: SEQUENCE SET; Schema: report; Owner: fundermaps
---
-
-SELECT pg_catalog.setval('report.project_id_seq', 10000, false);
-
-
---
--- Name: project_sample_id_seq; Type: SEQUENCE SET; Schema: report; Owner: fundermaps
---
-
-SELECT pg_catalog.setval('report.project_sample_id_seq', 10000, false);
-
-
--
-- Name: recovery_id_seq; Type: SEQUENCE SET; Schema: report; Owner: fundermaps
--
diff --git a/database/fundermaps_base.sql b/database/fundermaps_base.sql
index 6aeadafb5..e569aa661 100644
--- a/database/fundermaps_base.sql
+++ b/database/fundermaps_base.sql
@@ -824,34 +824,6 @@ ALTER TYPE report.pile_type OWNER TO fundermaps;
COMMENT ON TYPE report.pile_type IS 'Enum representing the type of pile.';
---
--- Name: project_sample_status; Type: TYPE; Schema: report; Owner: fundermaps
---
-
-CREATE TYPE report.project_sample_status AS ENUM (
- 'contacted',
- 'quotation_reserach',
- 'research_in_progress',
- 'research_pending',
- 'research_canceled',
- 'quotation_recovery',
- 'waiting_on_permit',
- 'recovery_in_progress',
- 'recovery_pending',
- 'recovery_canceled',
- 'none'
-);
-
-
-ALTER TYPE report.project_sample_status OWNER TO fundermaps;
-
---
--- Name: TYPE project_sample_status; Type: COMMENT; Schema: report; Owner: fundermaps
---
-
-COMMENT ON TYPE report.project_sample_status IS 'Enum representing the status of taking a sample for a project.';
-
-
--
-- Name: quality; Type: TYPE; Schema: report; Owner: fundermaps
--
@@ -1264,25 +1236,6 @@ ALTER FUNCTION application.is_geometry_in_fence(user_id uuid, geom public.geomet
COMMENT ON FUNCTION application.is_geometry_in_fence(user_id uuid, geom public.geometry) IS 'Validates whether or not a geometry intersects with the geofence of an organisation. Note that the specified id belongs to a user, not to an organization.';
---
--- Name: is_locked_out(application.user_id); Type: FUNCTION; Schema: application; Owner: fundermaps
---
-
-CREATE FUNCTION application.is_locked_out(id application.user_id) RETURNS boolean
- LANGUAGE sql
- AS $_$
-SELECT EXISTS (
- SELECT id
- FROM application.user
- WHERE id = $1
- AND lockout_end > NOW()
- LIMIT 1
-)
-;$_$;
-
-
-ALTER FUNCTION application.is_locked_out(id application.user_id) OWNER TO fundermaps;
-
--
-- Name: log_access(application.user_id); Type: FUNCTION; Schema: application; Owner: fundermaps
--
@@ -1651,7 +1604,6 @@ CREATE TABLE application."user" (
password_hash text,
phone_number application.phone,
two_factor_enabled boolean DEFAULT false NOT NULL,
- lockout_end timestamp with time zone,
access_failed_count integer DEFAULT 0 NOT NULL,
role application.role DEFAULT 'user'::application.role NOT NULL,
last_login timestamp with time zone,
@@ -1849,6 +1801,7 @@ COMMENT ON VIEW geocoder.building_active IS 'Contains all entries from geocoder.
CREATE MATERIALIZED VIEW data.analysis_foundation_indicative AS
SELECT b.id,
+ b.neighborhood_id,
bh.height,
b.geom,
'concrete'::report.foundation_type AS foundation_type
@@ -1860,6 +1813,7 @@ CREATE MATERIALIZED VIEW data.analysis_foundation_indicative AS
WHERE ((bt.id IS NULL) AND (date_part('year'::text, (b.built_year)::date) >= (1970)::double precision))
UNION ALL
SELECT b.id,
+ b.neighborhood_id,
bh.height,
b.geom,
'no_pile'::report.foundation_type AS foundation_type
@@ -1871,6 +1825,7 @@ UNION ALL
WHERE ((bt.id IS NULL) AND (date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height < (10.5)::double precision) AND (gr.code <> 'hz'::text))
UNION ALL
SELECT b.id,
+ b.neighborhood_id,
bh.height,
b.geom,
'no_pile'::report.foundation_type AS foundation_type
@@ -1882,6 +1837,7 @@ UNION ALL
WHERE ((bt.id IS NULL) AND (date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height < (10.5)::double precision) AND (gr.code = 'hz'::text))
UNION ALL
SELECT b.id,
+ b.neighborhood_id,
bh.height,
b.geom,
'wood'::report.foundation_type AS foundation_type
@@ -1893,6 +1849,7 @@ UNION ALL
WHERE ((bt.id IS NULL) AND (date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height >= (10.5)::double precision) AND (gr.code = 'hz'::text))
UNION ALL
SELECT b.id,
+ b.neighborhood_id,
bh.height,
b.geom,
'wood_charger'::report.foundation_type AS foundation_type
@@ -1904,6 +1861,7 @@ UNION ALL
WHERE ((bt.id IS NULL) AND (date_part('year'::text, (b.built_year)::date) > (1925)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height >= (10.5)::double precision) AND (gr.code <> 'hz'::text))
UNION ALL
SELECT b.id,
+ b.neighborhood_id,
bh.height,
b.geom,
'wood'::report.foundation_type AS foundation_type
@@ -1915,6 +1873,7 @@ UNION ALL
WHERE ((bt.id IS NULL) AND (date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1925)::double precision) AND (bh.height >= (10.5)::double precision) AND (gr.code <> 'hz'::text))
UNION ALL
SELECT b.id,
+ b.neighborhood_id,
bh.height,
b.geom,
'no_pile'::report.foundation_type AS foundation_type
@@ -1926,6 +1885,7 @@ UNION ALL
WHERE ((bt.id IS NULL) AND (date_part('year'::text, (b.built_year)::date) > (1700)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1800)::double precision) AND (bh.height < (10.5)::double precision))
UNION ALL
SELECT b.id,
+ b.neighborhood_id,
bh.height,
b.geom,
'no_pile'::report.foundation_type AS foundation_type
@@ -1937,6 +1897,7 @@ UNION ALL
WHERE ((bt.id IS NULL) AND (date_part('year'::text, (b.built_year)::date) < (1700)::double precision))
UNION ALL
SELECT b.id,
+ b.neighborhood_id,
bh.height,
b.geom,
'wood'::report.foundation_type AS foundation_type
@@ -1957,7 +1918,7 @@ ALTER TABLE data.analysis_foundation_indicative OWNER TO fundermaps;
CREATE TABLE data.building_groundwater_level (
building_id geocoder.geocoder_id NOT NULL,
- level double precision
+ level double precision NOT NULL
);
@@ -1969,6 +1930,7 @@ ALTER TABLE data.building_groundwater_level OWNER TO fundermaps;
CREATE MATERIALIZED VIEW data.analysis_foundation_risk AS
SELECT b.id,
+ b.neighborhood_id,
gr.code,
gwl.level AS groundwater_level,
b.geom,
@@ -1982,6 +1944,7 @@ CREATE MATERIALIZED VIEW data.analysis_foundation_risk AS
WHERE ((bt.id IS NULL) AND (date_part('year'::text, (b.built_year)::date) >= (1970)::double precision))
UNION ALL
SELECT b.id,
+ b.neighborhood_id,
gr.code,
gwl.level AS groundwater_level,
b.geom,
@@ -1995,6 +1958,7 @@ UNION ALL
WHERE (((bt.id IS NULL) AND (date_part('year'::text, (b.built_year)::date) < (1700)::double precision) AND (gwl.level > (0.6)::double precision) AND (s.velocity IS NULL)) OR ((date_part('year'::text, (b.built_year)::date) > (1700)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1800)::double precision) AND (bh.height < (9.5)::double precision) AND (gwl.level > (0.6)::double precision) AND (s.velocity IS NULL)) OR ((date_part('year'::text, (b.built_year)::date) > (1700)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1800)::double precision) AND (bh.height > (9.5)::double precision) AND (gwl.level < (1.5)::double precision) AND (s.velocity IS NULL)) OR ((date_part('year'::text, (b.built_year)::date) > (1700)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1800)::double precision) AND (bh.height >= (9.5)::double precision) AND (gwl.level < (1.5)::double precision) AND (s.velocity > (- (2.0)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height < (9.5)::double precision) AND (gr.code = 'hz'::text) AND (gwl.level > (0.6)::double precision) AND (s.velocity IS NULL)) OR ((date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height > (9.5)::double precision) AND (gr.code = 'hz'::text) AND (gwl.level < (1.5)::double precision) AND (s.velocity IS NULL)) OR ((date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height >= (9.5)::double precision) AND (gr.code = 'hz'::text) AND (gwl.level < (1.5)::double precision) AND (s.velocity > (- (2.0)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1925)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height > (9.5)::double precision) AND (gr.code <> 'hz'::text) AND (gwl.level < (2.5)::double precision) AND (s.velocity IS NULL)) OR ((date_part('year'::text, (b.built_year)::date) > (1925)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height >= (9.5)::double precision) AND (gr.code <> 'hz'::text) AND (gwl.level < (2.5)::double precision) AND (s.velocity > (- (1)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1925)::double precision) AND (bh.height >= (9.5)::double precision) AND (gr.code <> 'hz'::text) AND (gwl.level < (1.5)::double precision) AND (s.velocity IS NULL)) OR ((date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1925)::double precision) AND (bh.height >= (9.5)::double precision) AND (gr.code <> 'hz'::text) AND (gwl.level < (1.5)::double precision) AND (s.velocity > (- (2.0)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height < (9.5)::double precision) AND (gr.code = 'hz'::text) AND (gwl.level > (0.6)::double precision) AND (s.velocity > (- (1)::double precision))))
UNION ALL
SELECT b.id,
+ b.neighborhood_id,
gr.code,
gwl.level AS groundwater_level,
b.geom,
@@ -2008,6 +1972,7 @@ UNION ALL
WHERE (((bt.id IS NULL) AND (date_part('year'::text, (b.built_year)::date) < (1700)::double precision) AND (gwl.level < (0.6)::double precision) AND (s.velocity IS NULL)) OR ((date_part('year'::text, (b.built_year)::date) < (1700)::double precision) AND (gwl.level > (0.6)::double precision) AND (s.velocity > (- (1)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1700)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1800)::double precision) AND (bh.height < (9.5)::double precision) AND (gwl.level < (0.6)::double precision) AND (s.velocity IS NULL)) OR ((date_part('year'::text, (b.built_year)::date) > (1700)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1800)::double precision) AND (bh.height >= (9.5)::double precision) AND (gwl.level > (1.5)::double precision) AND (s.velocity IS NULL)) OR ((date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height < (9.5)::double precision) AND (gr.code = 'hz'::text) AND (gwl.level < (0.6)::double precision) AND (s.velocity IS NULL)) OR ((date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height < (9.5)::double precision) AND (gr.code = 'hz'::text) AND (gwl.level < (0.6)::double precision) AND (s.velocity > (- (1)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height >= (9.5)::double precision) AND (gr.code = 'hz'::text) AND (gwl.level > (1.5)::double precision) AND (s.velocity IS NULL)) OR ((date_part('year'::text, (b.built_year)::date) > (1925)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height >= (9.5)::double precision) AND (gr.code <> 'hz'::text) AND (gwl.level > (2.5)::double precision) AND (s.velocity IS NULL)) OR ((date_part('year'::text, (b.built_year)::date) > (1925)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height >= (9.5)::double precision) AND (gr.code <> 'hz'::text) AND (gwl.level > (2.5)::double precision) AND (s.velocity > (- (1)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1925)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height >= (9.5)::double precision) AND (gr.code <> 'hz'::text) AND (gwl.level < (2.5)::double precision) AND (s.velocity < (- (1)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1925)::double precision) AND (bh.height >= (9.5)::double precision) AND (gr.code <> 'hz'::text) AND (gwl.level > (1.5)::double precision) AND (s.velocity > (- (2.0)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1925)::double precision) AND (bh.height >= (9.5)::double precision) AND (gr.code <> 'hz'::text) AND (gwl.level < (1.5)::double precision) AND (s.velocity < (- (2.0)::double precision))))
UNION ALL
SELECT b.id,
+ b.neighborhood_id,
gr.code,
gwl.level AS groundwater_level,
b.geom,
@@ -2021,6 +1986,7 @@ UNION ALL
WHERE (((bt.id IS NULL) AND (date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1925)::double precision) AND (bh.height >= (9.5)::double precision) AND (gr.code <> 'hz'::text) AND (gwl.level > (1.5)::double precision) AND (s.velocity IS NULL)) OR ((date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height < (9.5)::double precision) AND (gr.code <> 'hz'::text) AND (gwl.level > (0.6)::double precision)) OR ((date_part('year'::text, (b.built_year)::date) < (1700)::double precision) AND (gwl.level > (0.6)::double precision) AND (s.velocity < (- (1)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) < (1700)::double precision) AND (gwl.level < (0.6)::double precision) AND (s.velocity > (- (1)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1700)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1800)::double precision) AND (bh.height < (9.5)::double precision) AND (gwl.level < (0.6)::double precision) AND (s.velocity > (- (1)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1700)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1800)::double precision) AND (bh.height >= (9.5)::double precision) AND (gwl.level > (1.5)::double precision) AND (s.velocity > (- (2.0)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1700)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1800)::double precision) AND (bh.height >= (9.5)::double precision) AND (gwl.level < (1.5)::double precision) AND (s.velocity < (- (2.0)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height < (9.5)::double precision) AND (gr.code = 'hz'::text) AND (gwl.level > (0.6)::double precision) AND (s.velocity < (- (1)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height > (9.5)::double precision) AND (gr.code = 'hz'::text) AND (gwl.level > (1.5)::double precision) AND (s.velocity > (- (2.0)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1800)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height >= (9.5)::double precision) AND (gr.code = 'hz'::text) AND (gwl.level < (1.5)::double precision) AND (s.velocity < (- (2.0)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1925)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1970)::double precision) AND (bh.height >= (9.5)::double precision) AND (gr.code <> 'hz'::text) AND (gwl.level > (2.5)::double precision) AND (s.velocity < (- (1)::double precision))) OR ((date_part('year'::text, (b.built_year)::date) > (1700)::double precision) AND (date_part('year'::text, (b.built_year)::date) < (1800)::double precision) AND (bh.height < (9.5)::double precision) AND (gwl.level > (0.6)::double precision) AND (s.velocity < (- (1)::double precision))))
UNION ALL
SELECT b.id,
+ b.neighborhood_id,
gr.code,
gwl.level AS groundwater_level,
b.geom,
@@ -2037,30 +2003,6 @@ UNION ALL
ALTER TABLE data.analysis_foundation_risk OWNER TO fundermaps;
---
--- Name: neighborhood; Type: TABLE; Schema: geocoder; Owner: fundermaps
---
-
-CREATE TABLE geocoder.neighborhood (
- id geocoder.geocoder_id NOT NULL,
- external_id text NOT NULL,
- external_source geocoder.data_source NOT NULL,
- district_id geocoder.geocoder_id NOT NULL,
- name text NOT NULL,
- water boolean NOT NULL,
- geom public.geometry(MultiPolygon,4326) NOT NULL
-);
-
-
-ALTER TABLE geocoder.neighborhood OWNER TO fundermaps;
-
---
--- Name: TABLE neighborhood; Type: COMMENT; Schema: geocoder; Owner: fundermaps
---
-
-COMMENT ON TABLE geocoder.neighborhood IS 'Contains all neighborhoods in our own format.';
-
-
--
-- Name: inquiry; Type: TABLE; Schema: report; Owner: fundermaps
--
@@ -2295,7 +2237,7 @@ CREATE VIEW data.analysis_address AS
a.id AS address_id,
a.external_id AS address_external_id,
a.postal_code,
- n.id AS neighborhood_id,
+ afr.neighborhood_id,
afr.groundwater_level,
afr.code AS soil,
be.roof AS building_height,
@@ -2350,9 +2292,8 @@ CREATE VIEW data.analysis_address AS
NULL::text AS bio_infection,
'indicative'::data.reliability AS bio_infection_reliability,
afr.foundation_risk AS bio_infection_risk
- FROM ((((((((geocoder.address a
+ FROM (((((((geocoder.address a
JOIN geocoder.building_active b ON (((a.building_id)::text = (b.id)::text)))
- JOIN geocoder.neighborhood n ON (((b.neighborhood_id)::text = (n.id)::text)))
JOIN data.analysis_foundation_indicative afi ON (((afi.id)::text = (b.id)::text)))
JOIN data.analysis_foundation_risk afr ON (((afr.id)::text = (b.id)::text)))
LEFT JOIN data.building_elevation be ON (((be.building_id)::text = (b.id)::text)))
@@ -2488,12 +2429,11 @@ COMMENT ON VIEW data.statistics_product_data_collected IS 'Contains statistics o
--
CREATE VIEW data.statistics_product_foundation_risk AS
- SELECT ba.neighborhood_id,
+ SELECT afr.neighborhood_id,
afr.foundation_risk,
- (((count(afr.foundation_risk))::numeric / sum(count(afr.foundation_risk)) OVER (PARTITION BY ba.neighborhood_id)) * (100)::numeric) AS percentage
- FROM (geocoder.building_active ba
- JOIN data.analysis_foundation_risk afr ON (((afr.id)::text = (ba.id)::text)))
- GROUP BY ba.neighborhood_id, afr.foundation_risk;
+ (((count(afr.foundation_risk))::numeric / sum(count(afr.foundation_risk)) OVER (PARTITION BY afr.neighborhood_id)) * (100)::numeric) AS percentage
+ FROM data.analysis_foundation_risk afr
+ GROUP BY afr.neighborhood_id, afr.foundation_risk;
ALTER TABLE data.statistics_product_foundation_risk OWNER TO fundermaps;
@@ -2503,12 +2443,11 @@ ALTER TABLE data.statistics_product_foundation_risk OWNER TO fundermaps;
--
CREATE VIEW data.statistics_product_foundation_type AS
- SELECT ba.neighborhood_id,
+ SELECT afi.neighborhood_id,
afi.foundation_type,
- (((count(afi.foundation_type))::numeric / sum(count(afi.foundation_type)) OVER (PARTITION BY ba.neighborhood_id)) * (100)::numeric) AS percentage
- FROM (geocoder.building_active ba
- JOIN data.analysis_foundation_indicative afi ON (((afi.id)::text = (ba.id)::text)))
- GROUP BY ba.neighborhood_id, afi.foundation_type;
+ (((count(afi.foundation_type))::numeric / sum(count(afi.foundation_type)) OVER (PARTITION BY afi.neighborhood_id)) * (100)::numeric) AS percentage
+ FROM data.analysis_foundation_indicative afi
+ GROUP BY afi.neighborhood_id, afi.foundation_type;
ALTER TABLE data.statistics_product_foundation_type OWNER TO fundermaps;
@@ -2722,6 +2661,30 @@ ALTER TABLE geocoder.municipality OWNER TO fundermaps;
COMMENT ON TABLE geocoder.municipality IS 'Contains all municipalities in our own format.';
+--
+-- Name: neighborhood; Type: TABLE; Schema: geocoder; Owner: fundermaps
+--
+
+CREATE TABLE geocoder.neighborhood (
+ id geocoder.geocoder_id NOT NULL,
+ external_id text NOT NULL,
+ external_source geocoder.data_source NOT NULL,
+ district_id geocoder.geocoder_id NOT NULL,
+ name text NOT NULL,
+ water boolean NOT NULL,
+ geom public.geometry(MultiPolygon,4326) NOT NULL
+);
+
+
+ALTER TABLE geocoder.neighborhood OWNER TO fundermaps;
+
+--
+-- Name: TABLE neighborhood; Type: COMMENT; Schema: geocoder; Owner: fundermaps
+--
+
+COMMENT ON TABLE geocoder.neighborhood IS 'Contains all neighborhoods in our own format.';
+
+
--
-- Name: state; Type: TABLE; Schema: geocoder; Owner: fundermaps
--
@@ -2754,9 +2717,10 @@ CREATE VIEW maplayer.building_built_year AS
SELECT ba.id,
ba.geom,
(date_part('year'::text, COALESCE((( SELECT is2.built_year
- FROM (geocoder.address addr
+ FROM ((geocoder.address addr
JOIN report.inquiry_sample is2 ON (((is2.address)::text = (addr.id)::text)))
- WHERE ((ba.id)::text = (addr.building_id)::text)
+ JOIN report.inquiry i ON ((i.id = is2.inquiry)))
+ WHERE (((ba.id)::text = (addr.building_id)::text) AND (i.document_date > (ba.built_year)::date))
ORDER BY COALESCE(is2.update_date, is2.create_date) DESC
LIMIT 1))::date, (ba.built_year)::date)))::integer AS built_year
FROM geocoder.building_active ba;
@@ -2855,9 +2819,11 @@ CREATE VIEW maplayer.foundation_indicative AS
afi.foundation_type
FROM data.analysis_foundation_indicative afi
WHERE (NOT ((afi.id)::text IN ( SELECT addr.building_id
- FROM (report.inquiry_sample ris
+ FROM (((report.inquiry_sample ris
+ JOIN report.inquiry i ON ((i.id = ris.inquiry)))
JOIN geocoder.address addr ON (((ris.address)::text = (addr.id)::text)))
- WHERE ((ris.foundation_type IS NOT NULL) AND (addr.building_id IS NOT NULL))
+ JOIN geocoder.building_active ba ON (((addr.building_id)::text = (ba.id)::text)))
+ WHERE ((ris.foundation_type IS NOT NULL) AND (i.document_date > (ba.built_year)::date))
UNION
SELECT addr.building_id
FROM (report.recovery_sample rs
@@ -2956,11 +2922,13 @@ CREATE VIEW maplayer.inquiry AS
SELECT ris.id,
i.id AS inquiry_id,
i.type,
- ab.geom,
- row_number() OVER (PARTITION BY ab.building_id ORDER BY i.document_date DESC) AS rank
- FROM ((report.inquiry_sample ris
- JOIN geocoder.address_building ab ON (((ris.address)::text = (ab.address_id)::text)))
+ ba.geom,
+ row_number() OVER (PARTITION BY ba.id ORDER BY i.document_date DESC) AS rank
+ FROM (((report.inquiry_sample ris
+ JOIN geocoder.address addr ON (((ris.address)::text = (addr.id)::text)))
+ JOIN geocoder.building_active ba ON (((addr.building_id)::text = (ba.id)::text)))
JOIN report.inquiry i ON ((i.id = ris.inquiry)))
+ WHERE (i.document_date > (ba.built_year)::date)
)
SELECT ik.id,
ik.inquiry_id,
@@ -2980,13 +2948,15 @@ CREATE VIEW maplayer.inquiry_sample_damage_cause AS
WITH inquiry_sample_rank AS (
SELECT ris.id,
i.id AS inquiry_id,
- ab.geom,
+ ba.geom,
ris.damage_cause,
ris.foundation_type,
- row_number() OVER (PARTITION BY ab.building_id ORDER BY i.document_date DESC) AS rank
- FROM ((report.inquiry_sample ris
- JOIN geocoder.address_building ab ON (((ris.address)::text = (ab.address_id)::text)))
+ row_number() OVER (PARTITION BY ba.id ORDER BY i.document_date DESC) AS rank
+ FROM (((report.inquiry_sample ris
+ JOIN geocoder.address addr ON (((ris.address)::text = (addr.id)::text)))
+ JOIN geocoder.building_active ba ON (((addr.building_id)::text = (ba.id)::text)))
JOIN report.inquiry i ON ((i.id = ris.inquiry)))
+ WHERE (i.document_date > (ba.built_year)::date)
)
SELECT ik.id,
ik.inquiry_id,
@@ -3006,7 +2976,7 @@ CREATE VIEW maplayer.inquiry_sample_enforcement_term AS
WITH inquiry_sample_rank AS (
SELECT ris.id,
i.id AS inquiry_id,
- ab.geom,
+ ba.geom,
date_part('years'::text, age((
CASE ris.enforcement_term
WHEN 'term05'::report.enforcement_term THEN (i.document_date + '5 years'::interval)
@@ -3021,11 +2991,12 @@ CREATE VIEW maplayer.inquiry_sample_enforcement_term AS
WHEN 'term40'::report.enforcement_term THEN (i.document_date + '40 years'::interval)
ELSE NULL::timestamp without time zone
END)::timestamp with time zone, CURRENT_TIMESTAMP)) AS enforcement_term,
- row_number() OVER (PARTITION BY ab.building_id ORDER BY i.document_date DESC) AS rank
- FROM ((report.inquiry_sample ris
- JOIN geocoder.address_building ab ON (((ris.address)::text = (ab.address_id)::text)))
+ row_number() OVER (PARTITION BY ba.id ORDER BY i.document_date DESC) AS rank
+ FROM (((report.inquiry_sample ris
+ JOIN geocoder.address addr ON (((ris.address)::text = (addr.id)::text)))
+ JOIN geocoder.building_active ba ON (((addr.building_id)::text = (ba.id)::text)))
JOIN report.inquiry i ON ((i.id = ris.inquiry)))
- WHERE (ris.enforcement_term IS NOT NULL)
+ WHERE ((ris.enforcement_term IS NOT NULL) AND (i.document_date > (ba.built_year)::date))
)
SELECT ik.id,
ik.inquiry_id,
@@ -3045,14 +3016,15 @@ CREATE VIEW maplayer.inquiry_sample_foundation_type AS
WITH inquiry_sample_rank AS (
SELECT ris.id,
i.id AS inquiry_id,
- ab.geom,
+ ba.geom,
ris.foundation_type,
- row_number() OVER (PARTITION BY ab.building_id ORDER BY i.document_date DESC) AS rank
- FROM ((report.inquiry_sample ris
- JOIN geocoder.address_building ab ON (((ris.address)::text = (ab.address_id)::text)))
+ row_number() OVER (PARTITION BY ba.id ORDER BY i.document_date DESC) AS rank
+ FROM (((report.inquiry_sample ris
+ JOIN geocoder.address addr ON (((ris.address)::text = (addr.id)::text)))
+ JOIN geocoder.building_active ba ON (((addr.building_id)::text = (ba.id)::text)))
JOIN report.inquiry i ON ((i.id = ris.inquiry)))
- WHERE ((ris.foundation_type IS NOT NULL) AND (NOT ((ris.address)::text IN ( SELECT recovery_sample.address
- FROM report.recovery_sample))))
+ WHERE ((ris.foundation_type IS NOT NULL) AND (NOT ((addr.id)::text IN ( SELECT recovery_sample.address
+ FROM report.recovery_sample))) AND (i.document_date > (ba.built_year)::date))
)
SELECT ik.id,
ik.inquiry_id,
@@ -3072,13 +3044,14 @@ CREATE VIEW maplayer.inquiry_sample_quality AS
WITH inquiry_sample_rank AS (
SELECT ris.id,
i.id AS inquiry_id,
- ab.geom,
+ ba.geom,
ris.overall_quality,
- row_number() OVER (PARTITION BY ab.building_id ORDER BY i.document_date DESC) AS rank
- FROM ((report.inquiry_sample ris
- JOIN geocoder.address_building ab ON (((ris.address)::text = (ab.address_id)::text)))
+ row_number() OVER (PARTITION BY ba.id ORDER BY i.document_date DESC) AS rank
+ FROM (((report.inquiry_sample ris
+ JOIN geocoder.address addr ON (((ris.address)::text = (addr.id)::text)))
+ JOIN geocoder.building_active ba ON (((addr.building_id)::text = (ba.id)::text)))
JOIN report.inquiry i ON ((i.id = ris.inquiry)))
- WHERE (ris.overall_quality IS NOT NULL)
+ WHERE ((ris.overall_quality IS NOT NULL) AND (i.document_date > (ba.built_year)::date))
)
SELECT ik.id,
ik.inquiry_id,
@@ -3271,154 +3244,6 @@ ALTER TABLE report.inquiry_sample_id_seq OWNER TO fundermaps;
ALTER SEQUENCE report.inquiry_sample_id_seq OWNED BY report.inquiry_sample.id;
---
--- Name: project; Type: TABLE; Schema: report; Owner: fundermaps
---
-
-CREATE TABLE report.project (
- id integer NOT NULL,
- dossier text,
- note text,
- start_date date NOT NULL,
- end_date date,
- create_date timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
- update_date timestamp with time zone,
- delete_date timestamp with time zone,
- adviser application.user_id,
- creator application.user_id,
- lead application.user_id,
- CONSTRAINT project_range_chk CHECK ((end_date > start_date))
-);
-
-
-ALTER TABLE report.project OWNER TO fundermaps;
-
---
--- Name: TABLE project; Type: COMMENT; Schema: report; Owner: fundermaps
---
-
-COMMENT ON TABLE report.project IS 'Contains projects.';
-
-
---
--- Name: COLUMN project.dossier; Type: COMMENT; Schema: report; Owner: fundermaps
---
-
-COMMENT ON COLUMN report.project.dossier IS 'User provided dossier number, must be unique';
-
-
---
--- Name: COLUMN project.create_date; Type: COMMENT; Schema: report; Owner: fundermaps
---
-
-COMMENT ON COLUMN report.project.create_date IS 'Timestamp of record creation, set by insert';
-
-
---
--- Name: COLUMN project.update_date; Type: COMMENT; Schema: report; Owner: fundermaps
---
-
-COMMENT ON COLUMN report.project.update_date IS 'Timestamp of last record update, automatically updated on record modification';
-
-
---
--- Name: COLUMN project.delete_date; Type: COMMENT; Schema: report; Owner: fundermaps
---
-
-COMMENT ON COLUMN report.project.delete_date IS 'Timestamp of soft delete';
-
-
---
--- Name: project_id_seq; Type: SEQUENCE; Schema: report; Owner: fundermaps
---
-
-CREATE SEQUENCE report.project_id_seq
- AS integer
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-
-ALTER TABLE report.project_id_seq OWNER TO fundermaps;
-
---
--- Name: project_id_seq; Type: SEQUENCE OWNED BY; Schema: report; Owner: fundermaps
---
-
-ALTER SEQUENCE report.project_id_seq OWNED BY report.project.id;
-
-
---
--- Name: project_sample; Type: TABLE; Schema: report; Owner: fundermaps
---
-
-CREATE TABLE report.project_sample (
- id integer NOT NULL,
- project integer NOT NULL,
- create_date timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
- update_date timestamp with time zone,
- delete_date timestamp with time zone,
- note text,
- status report.project_sample_status DEFAULT 'none'::report.project_sample_status NOT NULL,
- contact text,
- address geocoder.geocoder_id NOT NULL
-);
-
-
-ALTER TABLE report.project_sample OWNER TO fundermaps;
-
---
--- Name: TABLE project_sample; Type: COMMENT; Schema: report; Owner: fundermaps
---
-
-COMMENT ON TABLE report.project_sample IS 'Contains sample data for projects.';
-
-
---
--- Name: COLUMN project_sample.create_date; Type: COMMENT; Schema: report; Owner: fundermaps
---
-
-COMMENT ON COLUMN report.project_sample.create_date IS 'Timestamp of record creation, set by insert';
-
-
---
--- Name: COLUMN project_sample.update_date; Type: COMMENT; Schema: report; Owner: fundermaps
---
-
-COMMENT ON COLUMN report.project_sample.update_date IS 'Timestamp of last record update, automatically updated on record modification';
-
-
---
--- Name: COLUMN project_sample.delete_date; Type: COMMENT; Schema: report; Owner: fundermaps
---
-
-COMMENT ON COLUMN report.project_sample.delete_date IS 'Timestamp of soft delete';
-
-
---
--- Name: project_sample_id_seq; Type: SEQUENCE; Schema: report; Owner: fundermaps
---
-
-CREATE SEQUENCE report.project_sample_id_seq
- AS integer
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
-
-
-ALTER TABLE report.project_sample_id_seq OWNER TO fundermaps;
-
---
--- Name: project_sample_id_seq; Type: SEQUENCE OWNED BY; Schema: report; Owner: fundermaps
---
-
-ALTER SEQUENCE report.project_sample_id_seq OWNED BY report.project_sample.id;
-
-
--
-- Name: recovery_id_seq; Type: SEQUENCE; Schema: report; Owner: fundermaps
--
@@ -3484,20 +3309,6 @@ ALTER TABLE ONLY report.inquiry ALTER COLUMN id SET DEFAULT nextval('report.inqu
ALTER TABLE ONLY report.inquiry_sample ALTER COLUMN id SET DEFAULT nextval('report.inquiry_sample_id_seq'::regclass);
---
--- Name: project id; Type: DEFAULT; Schema: report; Owner: fundermaps
---
-
-ALTER TABLE ONLY report.project ALTER COLUMN id SET DEFAULT nextval('report.project_id_seq'::regclass);
-
-
---
--- Name: project_sample id; Type: DEFAULT; Schema: report; Owner: fundermaps
---
-
-ALTER TABLE ONLY report.project_sample ALTER COLUMN id SET DEFAULT nextval('report.project_sample_id_seq'::regclass);
-
-
--
-- Name: recovery id; Type: DEFAULT; Schema: report; Owner: fundermaps
--
@@ -3704,30 +3515,6 @@ ALTER TABLE ONLY report.inquiry_sample
ADD CONSTRAINT inquiry_sample_pkey PRIMARY KEY (id);
---
--- Name: project project_dossier_key; Type: CONSTRAINT; Schema: report; Owner: fundermaps
---
-
-ALTER TABLE ONLY report.project
- ADD CONSTRAINT project_dossier_key UNIQUE (dossier);
-
-
---
--- Name: project project_pkey; Type: CONSTRAINT; Schema: report; Owner: fundermaps
---
-
-ALTER TABLE ONLY report.project
- ADD CONSTRAINT project_pkey PRIMARY KEY (id);
-
-
---
--- Name: project_sample project_sample_pkey; Type: CONSTRAINT; Schema: report; Owner: fundermaps
---
-
-ALTER TABLE ONLY report.project_sample
- ADD CONSTRAINT project_sample_pkey PRIMARY KEY (id);
-
-
--
-- Name: recovery recovery_pkey; Type: CONSTRAINT; Schema: report; Owner: fundermaps
--
@@ -3755,7 +3542,7 @@ CREATE INDEX organization_fence_idx ON application.organization USING gist (fenc
-- Name: organization_normalized_email_idx; Type: INDEX; Schema: application; Owner: fundermaps
--
-CREATE UNIQUE INDEX organization_normalized_email_idx ON application.organization USING btree (normalized_email) WHERE (normalized_email IS NOT NULL);
+CREATE UNIQUE INDEX organization_normalized_email_idx ON application.organization USING btree (normalized_email);
--
@@ -3769,7 +3556,7 @@ CREATE INDEX organization_proposal_normalized_email_idx ON application.organizat
-- Name: user_normalized_email_idx; Type: INDEX; Schema: application; Owner: fundermaps
--
-CREATE UNIQUE INDEX user_normalized_email_idx ON application."user" USING btree (normalized_email) WHERE (normalized_email IS NOT NULL);
+CREATE UNIQUE INDEX user_normalized_email_idx ON application."user" USING btree (normalized_email);
--
@@ -3786,6 +3573,13 @@ CREATE INDEX analysis_foundation_indicative_foundation_type_idx ON data.analysis
CREATE INDEX analysis_foundation_indicative_id_idx ON data.analysis_foundation_indicative USING btree (id);
+--
+-- Name: analysis_foundation_indicative_neighborhood_id_idx; Type: INDEX; Schema: data; Owner: fundermaps
+--
+
+CREATE INDEX analysis_foundation_indicative_neighborhood_id_idx ON data.analysis_foundation_indicative USING btree (neighborhood_id);
+
+
--
-- Name: analysis_foundation_risk_id_idx; Type: INDEX; Schema: data; Owner: fundermaps
--
@@ -3793,6 +3587,20 @@ CREATE INDEX analysis_foundation_indicative_id_idx ON data.analysis_foundation_i
CREATE INDEX analysis_foundation_risk_id_idx ON data.analysis_foundation_risk USING btree (id);
+--
+-- Name: analysis_foundation_risk_neighborhood_id_idx; Type: INDEX; Schema: data; Owner: fundermaps
+--
+
+CREATE INDEX analysis_foundation_risk_neighborhood_id_idx ON data.analysis_foundation_risk USING btree (neighborhood_id);
+
+
+--
+-- Name: building_elevation_available_idx; Type: INDEX; Schema: data; Owner: fundermaps
+--
+
+CREATE INDEX building_elevation_available_idx ON data.building_elevation USING btree (building_id) WHERE ((roof IS NOT NULL) AND (ground IS NOT NULL));
+
+
--
-- Name: building_type_id_idx; Type: INDEX; Schema: data; Owner: fundermaps
--
@@ -3856,6 +3664,13 @@ CREATE UNIQUE INDEX address_external_id_source_idx ON geocoder.address USING btr
CREATE INDEX address_streetname_idx ON geocoder.address USING btree (lower(street));
+--
+-- Name: building_active_idx; Type: INDEX; Schema: geocoder; Owner: fundermaps
+--
+
+CREATE INDEX building_active_idx ON geocoder.building USING btree (id) WHERE (is_active AND (geom IS NOT NULL));
+
+
--
-- Name: building_construction_year_idx; Type: INDEX; Schema: geocoder; Owner: fundermaps
--
@@ -3877,6 +3692,13 @@ CREATE UNIQUE INDEX building_external_id_source_idx ON geocoder.building USING b
CREATE INDEX building_geom_idx ON geocoder.building USING gist (geom);
+--
+-- Name: building_neighborhood_active_idx; Type: INDEX; Schema: geocoder; Owner: fundermaps
+--
+
+CREATE INDEX building_neighborhood_active_idx ON geocoder.building USING btree (neighborhood_id) WHERE (is_active AND (geom IS NOT NULL));
+
+
--
-- Name: building_neighborhood_idx; Type: INDEX; Schema: geocoder; Owner: fundermaps
--
@@ -4031,6 +3853,13 @@ CREATE INDEX inquiry_access_policy_idx ON report.inquiry USING btree (access_pol
CREATE INDEX inquiry_document_date_idx ON report.inquiry USING btree (document_date);
+--
+-- Name: inquiry_sample_address_idx; Type: INDEX; Schema: report; Owner: fundermaps
+--
+
+CREATE INDEX inquiry_sample_address_idx ON report.inquiry_sample USING btree (address);
+
+
--
-- Name: inquiry_type_idx; Type: INDEX; Schema: report; Owner: fundermaps
--
@@ -4045,6 +3874,13 @@ CREATE INDEX inquiry_type_idx ON report.inquiry USING btree (type);
CREATE INDEX recovery_access_policy_idx ON report.recovery USING btree (access_policy);
+--
+-- Name: recovery_sample_address_idx; Type: INDEX; Schema: report; Owner: fundermaps
+--
+
+CREATE INDEX recovery_sample_address_idx ON report.recovery_sample USING btree (address);
+
+
--
-- Name: recovery_sample_pile_type_idx; Type: INDEX; Schema: report; Owner: fundermaps
--
@@ -4108,20 +3944,6 @@ CREATE TRIGGER update_date_record BEFORE UPDATE ON report.inquiry FOR EACH ROW E
CREATE TRIGGER update_date_record BEFORE UPDATE ON report.inquiry_sample FOR EACH ROW EXECUTE FUNCTION report.last_record_update();
---
--- Name: project update_date_record; Type: TRIGGER; Schema: report; Owner: fundermaps
---
-
-CREATE TRIGGER update_date_record BEFORE UPDATE ON report.project FOR EACH ROW EXECUTE FUNCTION report.last_record_update();
-
-
---
--- Name: project_sample update_date_record; Type: TRIGGER; Schema: report; Owner: fundermaps
---
-
-CREATE TRIGGER update_date_record BEFORE UPDATE ON report.project_sample FOR EACH ROW EXECUTE FUNCTION report.last_record_update();
-
-
--
-- Name: recovery update_date_record; Type: TRIGGER; Schema: report; Owner: fundermaps
--
@@ -4320,54 +4142,6 @@ ALTER TABLE ONLY report.inquiry_sample
ADD CONSTRAINT inquiry_sample_inquiry_fkey FOREIGN KEY (inquiry) REFERENCES report.inquiry(id) ON UPDATE CASCADE ON DELETE CASCADE;
---
--- Name: project project_adviser_fkey; Type: FK CONSTRAINT; Schema: report; Owner: fundermaps
---
-
-ALTER TABLE ONLY report.project
- ADD CONSTRAINT project_adviser_fkey FOREIGN KEY (adviser) REFERENCES application."user"(id) ON UPDATE CASCADE ON DELETE SET NULL;
-
-
---
--- Name: project project_creator_fkey; Type: FK CONSTRAINT; Schema: report; Owner: fundermaps
---
-
-ALTER TABLE ONLY report.project
- ADD CONSTRAINT project_creator_fkey FOREIGN KEY (creator) REFERENCES application."user"(id) ON UPDATE CASCADE ON DELETE SET NULL;
-
-
---
--- Name: project project_lead_fkey; Type: FK CONSTRAINT; Schema: report; Owner: fundermaps
---
-
-ALTER TABLE ONLY report.project
- ADD CONSTRAINT project_lead_fkey FOREIGN KEY (lead) REFERENCES application."user"(id) ON UPDATE CASCADE ON DELETE SET NULL;
-
-
---
--- Name: project_sample project_sample_address_fkey; Type: FK CONSTRAINT; Schema: report; Owner: fundermaps
---
-
-ALTER TABLE ONLY report.project_sample
- ADD CONSTRAINT project_sample_address_fkey FOREIGN KEY (address) REFERENCES geocoder.address(id) ON UPDATE CASCADE ON DELETE RESTRICT;
-
-
---
--- Name: project_sample project_sample_contact_fkey; Type: FK CONSTRAINT; Schema: report; Owner: fundermaps
---
-
-ALTER TABLE ONLY report.project_sample
- ADD CONSTRAINT project_sample_contact_fkey FOREIGN KEY (contact) REFERENCES application.contact(email) ON UPDATE CASCADE ON DELETE RESTRICT;
-
-
---
--- Name: project_sample project_sample_project_fkey; Type: FK CONSTRAINT; Schema: report; Owner: fundermaps
---
-
-ALTER TABLE ONLY report.project_sample
- ADD CONSTRAINT project_sample_project_fkey FOREIGN KEY (project) REFERENCES report.project(id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
--
-- Name: recovery recovery_attribution_fkey; Type: FK CONSTRAINT; Schema: report; Owner: fundermaps
--
@@ -4722,14 +4496,6 @@ GRANT ALL ON TYPE report.pile_type TO fundermaps_webapp;
GRANT ALL ON TYPE report.pile_type TO fundermaps_webservice;
---
--- Name: TYPE project_sample_status; Type: ACL; Schema: report; Owner: fundermaps
---
-
-GRANT ALL ON TYPE report.project_sample_status TO fundermaps_webapp;
-GRANT ALL ON TYPE report.project_sample_status TO fundermaps_webservice;
-
-
--
-- Name: TYPE quality; Type: ACL; Schema: report; Owner: fundermaps
--
@@ -4877,14 +4643,6 @@ GRANT ALL ON FUNCTION application.is_geometry_in_fence(user_id uuid, geom public
GRANT ALL ON FUNCTION application.is_geometry_in_fence(user_id uuid, geom public.geometry) TO fundermaps_batch;
---
--- Name: FUNCTION is_locked_out(id application.user_id); Type: ACL; Schema: application; Owner: fundermaps
---
-
-GRANT ALL ON FUNCTION application.is_locked_out(id application.user_id) TO fundermaps_webservice;
-GRANT ALL ON FUNCTION application.is_locked_out(id application.user_id) TO pg_execute_server_program;
-
-
--
-- Name: FUNCTION log_access(id application.user_id); Type: ACL; Schema: application; Owner: fundermaps
--
@@ -5125,16 +4883,6 @@ GRANT SELECT ON TABLE data.analysis_foundation_risk TO fundermaps_webapp;
GRANT SELECT ON TABLE data.analysis_foundation_risk TO fundermaps_webservice;
---
--- Name: TABLE neighborhood; Type: ACL; Schema: geocoder; Owner: fundermaps
---
-
-GRANT SELECT,REFERENCES,TRIGGER ON TABLE geocoder.neighborhood TO fundermaps_webapp;
-GRANT SELECT,REFERENCES,TRIGGER ON TABLE geocoder.neighborhood TO fundermaps_webservice;
-GRANT SELECT,REFERENCES ON TABLE geocoder.neighborhood TO fundermaps_portal;
-GRANT SELECT,REFERENCES ON TABLE geocoder.neighborhood TO fundermaps_batch;
-
-
--
-- Name: TABLE inquiry; Type: ACL; Schema: report; Owner: fundermaps
--
@@ -5296,6 +5044,16 @@ GRANT SELECT,REFERENCES ON TABLE geocoder.municipality TO fundermaps_portal;
GRANT SELECT,REFERENCES ON TABLE geocoder.municipality TO fundermaps_batch;
+--
+-- Name: TABLE neighborhood; Type: ACL; Schema: geocoder; Owner: fundermaps
+--
+
+GRANT SELECT,REFERENCES,TRIGGER ON TABLE geocoder.neighborhood TO fundermaps_webapp;
+GRANT SELECT,REFERENCES,TRIGGER ON TABLE geocoder.neighborhood TO fundermaps_webservice;
+GRANT SELECT,REFERENCES ON TABLE geocoder.neighborhood TO fundermaps_portal;
+GRANT SELECT,REFERENCES ON TABLE geocoder.neighborhood TO fundermaps_batch;
+
+
--
-- Name: TABLE state; Type: ACL; Schema: geocoder; Owner: fundermaps
--
@@ -5474,36 +5232,6 @@ GRANT SELECT,USAGE ON SEQUENCE report.inquiry_sample_id_seq TO fundermaps_webser
GRANT SELECT,USAGE ON SEQUENCE report.inquiry_sample_id_seq TO fundermaps_portal;
---
--- Name: TABLE project; Type: ACL; Schema: report; Owner: fundermaps
---
-
-GRANT SELECT,INSERT,REFERENCES,DELETE,TRIGGER,UPDATE ON TABLE report.project TO fundermaps_webapp;
-
-
---
--- Name: SEQUENCE project_id_seq; Type: ACL; Schema: report; Owner: fundermaps
---
-
-GRANT ALL ON SEQUENCE report.project_id_seq TO fundermaps_webapp;
-GRANT SELECT,USAGE ON SEQUENCE report.project_id_seq TO fundermaps_webservice;
-
-
---
--- Name: TABLE project_sample; Type: ACL; Schema: report; Owner: fundermaps
---
-
-GRANT SELECT,INSERT,REFERENCES,DELETE,TRIGGER,UPDATE ON TABLE report.project_sample TO fundermaps_webapp;
-
-
---
--- Name: SEQUENCE project_sample_id_seq; Type: ACL; Schema: report; Owner: fundermaps
---
-
-GRANT ALL ON SEQUENCE report.project_sample_id_seq TO fundermaps_webapp;
-GRANT SELECT,USAGE ON SEQUENCE report.project_sample_id_seq TO fundermaps_webservice;
-
-
--
-- Name: SEQUENCE recovery_id_seq; Type: ACL; Schema: report; Owner: fundermaps
--
diff --git a/database/data/precompute.sql b/database/precompute.sql
similarity index 100%
rename from database/data/precompute.sql
rename to database/precompute.sql
diff --git a/scripts/loaddb.sh b/scripts/loaddb.sh
index f571a6d70..3f266c007 100755
--- a/scripts/loaddb.sh
+++ b/scripts/loaddb.sh
@@ -20,4 +20,4 @@ psql -h localhost -U postgres -d fundermaps -v ON_ERROR_STOP=1 < database/data/s
psql -h localhost -U postgres -d fundermaps -v ON_ERROR_STOP=1 < database/data/seed_data.sql
psql -h localhost -U postgres -d fundermaps -v ON_ERROR_STOP=1 < database/data/seed_maplayer.sql
psql -h localhost -U postgres -d fundermaps -v ON_ERROR_STOP=1 < database/data/seed_report.sql
-psql -h localhost -U postgres -d fundermaps -v ON_ERROR_STOP=1 < database/data/precompute.sql
+psql -h localhost -U postgres -d fundermaps -v ON_ERROR_STOP=1 < database/precompute.sql
diff --git a/src/FunderMaps.AspNetCore/HealthChecks/RepositoryHealthCheck.cs b/src/FunderMaps.AspNetCore/HealthChecks/RepositoryHealthCheck.cs
index 8fa6274f0..6776e1e36 100644
--- a/src/FunderMaps.AspNetCore/HealthChecks/RepositoryHealthCheck.cs
+++ b/src/FunderMaps.AspNetCore/HealthChecks/RepositoryHealthCheck.cs
@@ -25,7 +25,7 @@ public RepositoryHealthCheck(ITestRepository testRepository)
/// A System.Threading.CancellationToken that can be used to cancel the health check.
/// Instance of .
public async Task CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken)
- => await _testRepository.IsAlive()
+ => await _testRepository.IsAliveAsync()
? HealthCheckResult.Healthy()
: HealthCheckResult.Unhealthy();
}
diff --git a/src/FunderMaps.AspNetCore/Services/SignInService.cs b/src/FunderMaps.AspNetCore/Services/SignInService.cs
index b46a6e242..6bbd9538a 100644
--- a/src/FunderMaps.AspNetCore/Services/SignInService.cs
+++ b/src/FunderMaps.AspNetCore/Services/SignInService.cs
@@ -95,7 +95,7 @@ public virtual async Task SetPasswordAsync(Guid id, string password)
///
/// The principal to sign in.
/// Instance of .
- public virtual async Task SignInAsync(ClaimsPrincipal principal)
+ public virtual ValueTask SignInAsync(ClaimsPrincipal principal)
{
if (principal is null)
{
@@ -114,19 +114,12 @@ public virtual async Task SignInAsync(ClaimsPrincipal principal)
throw new AuthenticationException();
}
- if (await UserRepository.IsLockedOutAsync(user.Id))
- {
- Logger.LogWarning($"User '{user}' is currently locked out.");
-
- throw new AuthenticationException();
- }
-
Logger.LogTrace($"User '{user}' sign in was successful.");
principal = PrincipalProvider.CreateTenantUserPrincipal(user, tenant,
Enum.Parse(claim.Value),
JwtBearerDefaults.AuthenticationScheme);
- return TokenProvider.GetTokenContext(principal);
+ return new(TokenProvider.GetTokenContext(principal));
}
///
@@ -137,19 +130,11 @@ public virtual async Task SignInAsync(ClaimsPrincipal principal)
/// Instance of .
public virtual async Task PasswordSignInAsync(string email, string password)
{
- IUser user = await UserRepository.GetByEmailAsync(email);
- if (user is null)
+ if (await UserRepository.GetByEmailAsync(email) is not IUser user)
{
throw new AuthenticationException();
}
- if (await UserRepository.IsLockedOutAsync(user.Id))
- {
- Logger.LogWarning($"User '{user}' is currently locked out.");
-
- throw new AuthenticationException();
- }
-
// FUTURE: Single call?
var organizationId = await OrganizationUserRepository.GetOrganizationByUserIdAsync(user.Id);
Organization organization = await OrganizationRepository.GetByIdAsync(organizationId);
diff --git a/src/FunderMaps.Core/Abstractions/AppServiceBase.cs b/src/FunderMaps.Core/Abstractions/AppServiceBase.cs
index 2651775e4..f3575744c 100644
--- a/src/FunderMaps.Core/Abstractions/AppServiceBase.cs
+++ b/src/FunderMaps.Core/Abstractions/AppServiceBase.cs
@@ -1,6 +1,5 @@
namespace FunderMaps.Core.Abstractions
{
- // TODO: Add Logging ?
///
/// Application service base.
///
diff --git a/src/FunderMaps.Core/AppContext.cs b/src/FunderMaps.Core/AppContext.cs
index d4bb3d76b..5bd42d920 100644
--- a/src/FunderMaps.Core/AppContext.cs
+++ b/src/FunderMaps.Core/AppContext.cs
@@ -7,8 +7,6 @@
namespace FunderMaps.Core
{
- // TODO:
- // - Culture
///
/// Application context to the entire application.
///
diff --git a/src/FunderMaps.Core/Entities/AccessControl.cs b/src/FunderMaps.Core/Entities/AccessControl.cs
index 2d6c3af29..5bbc6a0db 100644
--- a/src/FunderMaps.Core/Entities/AccessControl.cs
+++ b/src/FunderMaps.Core/Entities/AccessControl.cs
@@ -3,7 +3,6 @@
namespace FunderMaps.Core.Entities
{
- // TODO: Remove
// FUTURE: Remove in the long term.
///
/// Record control.
diff --git a/src/FunderMaps.Core/Entities/Incident.cs b/src/FunderMaps.Core/Entities/Incident.cs
index e62f7f9f7..e5d4a2dae 100644
--- a/src/FunderMaps.Core/Entities/Incident.cs
+++ b/src/FunderMaps.Core/Entities/Incident.cs
@@ -5,7 +5,6 @@
namespace FunderMaps.Core.Entities
{
- // TODO inherit from StateControl?
///
/// Indicent entity.
///
@@ -35,7 +34,7 @@ public Incident()
/// Foundation type.
///
[EnumDataType(typeof(FoundationType))]
- public FoundationType FoundationType { get; set; }
+ public FoundationType? FoundationType { get; set; }
///
/// Building chained to another building.
diff --git a/src/FunderMaps.Core/Entities/Organization.cs b/src/FunderMaps.Core/Entities/Organization.cs
index 2051bf7e9..d41658132 100644
--- a/src/FunderMaps.Core/Entities/Organization.cs
+++ b/src/FunderMaps.Core/Entities/Organization.cs
@@ -45,9 +45,6 @@ public Organization()
///
public string BrandingLogo { get; set; }
- // TODO: Convert to geocoder address?
- // TODO: Drop the PO box?
-
///
/// Street.
///
diff --git a/src/FunderMaps.Core/Entities/Project.cs b/src/FunderMaps.Core/Entities/Project.cs
index f11e6ff37..35d92ec2d 100644
--- a/src/FunderMaps.Core/Entities/Project.cs
+++ b/src/FunderMaps.Core/Entities/Project.cs
@@ -3,7 +3,6 @@
namespace FunderMaps.Core.Entities
{
- // TODO inherit from StateControl?
///
/// Project entity.
///
diff --git a/src/FunderMaps.Core/Entities/ProjectSample.cs b/src/FunderMaps.Core/Entities/ProjectSample.cs
deleted file mode 100644
index db30a2880..000000000
--- a/src/FunderMaps.Core/Entities/ProjectSample.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using FunderMaps.Core.DataAnnotations;
-using FunderMaps.Core.Types;
-using System.ComponentModel.DataAnnotations;
-
-namespace FunderMaps.Core.Entities
-{
- ///
- /// Project sample entity.
- ///
- public sealed class ProjectSample : RecordControl
- {
- ///
- /// Create new instance.
- ///
- public ProjectSample()
- : base(e => e.Id)
- {
- }
-
- ///
- /// Project sample identifier.
- ///
- public int Id { get; set; }
-
- ///
- /// Project identifier.
- ///
- public int Project { get; set; }
-
- ///
- /// Status.
- ///
- public ProjectSampleStatus Status { get; set; }
-
- ///
- /// Contact email.
- ///
- [EmailAddress]
- public string Email { get; set; }
-
- ///
- /// Note.
- ///
- public string Note { get; set; }
-
- ///
- /// Address identifier.
- ///
- [Geocoder]
- public string Address { get; set; }
-
- ///
- /// Project object.
- ///
- public Project ProjectNavigation { get; set; }
-
- ///
- /// Contact object.
- ///
- public Contact ContactNavigation { get; set; }
-
- ///
- /// Address object.
- ///
- public Address AddressNavigation { get; set; }
- }
-}
diff --git a/src/FunderMaps.Core/Entities/RecordControl.cs b/src/FunderMaps.Core/Entities/RecordControl.cs
index a27d06386..3840ae14e 100644
--- a/src/FunderMaps.Core/Entities/RecordControl.cs
+++ b/src/FunderMaps.Core/Entities/RecordControl.cs
@@ -2,7 +2,7 @@
namespace FunderMaps.Core.Entities
{
- // TODO: Remove in the long term. This is meta data.
+ // FUTURE: Remove in the long term. This is meta data.
///
/// Record timestamps.
///
diff --git a/src/FunderMaps.Core/FunderMaps.Core.csproj b/src/FunderMaps.Core/FunderMaps.Core.csproj
index 648993b88..d0e7b178e 100644
--- a/src/FunderMaps.Core/FunderMaps.Core.csproj
+++ b/src/FunderMaps.Core/FunderMaps.Core.csproj
@@ -25,7 +25,7 @@
-
+
diff --git a/src/FunderMaps.Core/Interfaces/Repositories/ITestRepository.cs b/src/FunderMaps.Core/Interfaces/Repositories/ITestRepository.cs
index e12242b07..50ac69318 100644
--- a/src/FunderMaps.Core/Interfaces/Repositories/ITestRepository.cs
+++ b/src/FunderMaps.Core/Interfaces/Repositories/ITestRepository.cs
@@ -10,6 +10,6 @@ public interface ITestRepository
///
/// Check if backend is online.
///
- Task IsAlive();
+ Task IsAliveAsync();
}
}
diff --git a/src/FunderMaps.Core/Interfaces/Repositories/IUserRepository.cs b/src/FunderMaps.Core/Interfaces/Repositories/IUserRepository.cs
index e72e3053b..b13c6d02b 100644
--- a/src/FunderMaps.Core/Interfaces/Repositories/IUserRepository.cs
+++ b/src/FunderMaps.Core/Interfaces/Repositories/IUserRepository.cs
@@ -23,13 +23,6 @@ public interface IUserRepository : IAsyncRepository
/// Password hash as string.
Task GetPasswordHashAsync(Guid id);
- ///
- /// Whether or not user is locked out.
- ///
- /// Entity identifier.
- /// True if locked out, false otherwise.
- Task IsLockedOutAsync(Guid id);
-
///
/// Update user password.
///
diff --git a/src/FunderMaps.Core/Services/NullBlobStorageService.cs b/src/FunderMaps.Core/Services/NullBlobStorageService.cs
index 299565447..167f33bf1 100644
--- a/src/FunderMaps.Core/Services/NullBlobStorageService.cs
+++ b/src/FunderMaps.Core/Services/NullBlobStorageService.cs
@@ -12,15 +12,6 @@ namespace FunderMaps.Core.Services
///
internal class NullBlobStorageService : IBlobStorageService
{
- ///
- /// Check if a file exist in storage.
- ///
- /// Storage container.
- /// File name.
- /// True if file exist, false otherwise.
- public Task FileExistsAsync(string containerName, string fileName)
- => Task.FromResult(false);
-
///
/// Retrieve file access link as uri.
///
@@ -31,15 +22,6 @@ public Task FileExistsAsync(string containerName, string fileName)
public Task GetAccessLinkAsync(string containerName, string fileName, double hoursValid)
=> Task.FromResult(new Uri("https://localhost/blob"));
- ///
- /// Store the file in the data store.
- ///
- /// Storage container.
- /// File name.
- /// Content stream.
- public Task StoreFileAsync(string containerName, string fileName, Stream stream)
- => Task.CompletedTask;
-
///
/// Stores a file in Amazon S3.
///
diff --git a/src/FunderMaps.Core/Services/ProductService.cs b/src/FunderMaps.Core/Services/ProductService.cs
index f02042522..9d0c407c6 100644
--- a/src/FunderMaps.Core/Services/ProductService.cs
+++ b/src/FunderMaps.Core/Services/ProductService.cs
@@ -59,6 +59,9 @@ private async Task GetStatisticsByExternalIdAsync(string id)
MunicipalityReportCount = await _statisticsRepository.GetMunicipalityReportCountByExternalIdAsync(id),
};
+ ///
+ /// Generate drystand description text.
+ ///
private string DescriptionDrystand(FoundationRisk? risk, double? drystand)
=> risk switch
{
@@ -79,6 +82,9 @@ var risk_low when (
_ => "Onbekend",
};
+ ///
+ /// Generate dewatering depth description text.
+ ///
private string DescriptionDewateringDepth(FoundationRisk? risk, double? dewateringDepth, string soil)
=> risk switch
{
@@ -99,6 +105,9 @@ var risk_low when (
_ => "Onbekend",
};
+ ///
+ /// Generate bioinfection description text.
+ ///
private string DescriptionBioInfection(FoundationRisk? risk)
=> risk switch
{
diff --git a/src/FunderMaps.Core/Types/AuditStatus.cs b/src/FunderMaps.Core/Types/AuditStatus.cs
index b99a50775..c8c2c4aa5 100644
--- a/src/FunderMaps.Core/Types/AuditStatus.cs
+++ b/src/FunderMaps.Core/Types/AuditStatus.cs
@@ -20,7 +20,7 @@ public enum AuditStatus
///
Done = 2,
- // TODO: Remove.
+ // FUTURE: Remove.
///
/// Discarded.
///
diff --git a/src/FunderMaps.Core/Types/Bundle/BundleStatus.cs b/src/FunderMaps.Core/Types/Bundle/BundleStatus.cs
deleted file mode 100644
index 5158bf1f0..000000000
--- a/src/FunderMaps.Core/Types/Bundle/BundleStatus.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-namespace FunderMaps.Core.Types.MapLayer
-{
- ///
- /// Bundle status enum
- ///
- public enum BundleStatus
- {
- ///
- /// This bundle has just been created.
- ///
- Created,
-
- ///
- /// The bundle is being processed by some external entity.
- /// The current version is still accurate.
- ///
- Processing,
-
- ///
- /// The bundle is up to date and the current version is accurate.
- ///
- UpToDate,
-
- ///
- /// The bundle has been deleted.
- ///
- Deleted,
- }
-}
diff --git a/src/FunderMaps.Core/Types/Bundle/LayerColumnPair.cs b/src/FunderMaps.Core/Types/Bundle/LayerColumnPair.cs
index db12a9e30..8fc839570 100644
--- a/src/FunderMaps.Core/Types/Bundle/LayerColumnPair.cs
+++ b/src/FunderMaps.Core/Types/Bundle/LayerColumnPair.cs
@@ -15,8 +15,6 @@ public sealed class LayerColumnPair
[Required]
public Guid LayerId { get; set; }
- // TODO Min length attribute?
- // TODO Must contain geom attribute?
///
/// Collection of selected column names.
///
diff --git a/src/FunderMaps.Core/Types/ProjectSampleStatus.cs b/src/FunderMaps.Core/Types/ProjectSampleStatus.cs
deleted file mode 100644
index b4e089201..000000000
--- a/src/FunderMaps.Core/Types/ProjectSampleStatus.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-namespace FunderMaps.Core.Types
-{
- ///
- /// Project sample status.
- ///
- public enum ProjectSampleStatus
- {
- ///
- /// Contacted.
- ///
- Contacted = 0,
-
- ///
- /// Quotation reserach.
- ///
- QuotationReserach = 1,
-
- ///
- /// Research in progress.
- ///
- ResearchInProgress = 2,
-
- ///
- /// Research pending.
- ///
- ResearchPending = 3,
-
- ///
- /// Research canceled.
- ///
- ResearchCanceled = 4,
-
- ///
- /// Quotation recovery.
- ///
- QuotationRecovery = 5,
-
- ///
- /// Waiting on permit.
- ///
- WaitingOnPermit = 6,
-
- ///
- /// Recovery in progress.
- ///
- RecoveryInProgress = 7,
-
- ///
- /// Recovery pending.
- ///
- RecoveryPending = 8,
-
- ///
- /// Recovery canceled.
- ///
- RecoveryCanceled = 9,
-
- ///
- /// None.
- ///
- None = 10,
- }
-}
diff --git a/src/FunderMaps.Data/FunderMaps.Data.csproj b/src/FunderMaps.Data/FunderMaps.Data.csproj
index 6dd0bcc9f..496b0bda1 100644
--- a/src/FunderMaps.Data/FunderMaps.Data.csproj
+++ b/src/FunderMaps.Data/FunderMaps.Data.csproj
@@ -11,7 +11,7 @@
-
+
diff --git a/src/FunderMaps.Data/Providers/NpgsqlDbProvider.cs b/src/FunderMaps.Data/Providers/NpgsqlDbProvider.cs
index 91d5c8947..6d1c78f50 100644
--- a/src/FunderMaps.Data/Providers/NpgsqlDbProvider.cs
+++ b/src/FunderMaps.Data/Providers/NpgsqlDbProvider.cs
@@ -50,7 +50,6 @@ static NpgsqlDbProvider()
NpgsqlConnection.GlobalTypeMapper.MapEnum("report.audit_status");
NpgsqlConnection.GlobalTypeMapper.MapEnum("geocoder.building_type");
NpgsqlConnection.GlobalTypeMapper.MapEnum("report.built_year_source");
- NpgsqlConnection.GlobalTypeMapper.MapEnum("maplayer.bundle_status");
NpgsqlConnection.GlobalTypeMapper.MapEnum("report.construction_pile");
NpgsqlConnection.GlobalTypeMapper.MapEnum("report.crack_type");
NpgsqlConnection.GlobalTypeMapper.MapEnum("report.enforcement_term");
@@ -66,7 +65,6 @@ static NpgsqlDbProvider()
NpgsqlConnection.GlobalTypeMapper.MapEnum("report.inquiry_type");
NpgsqlConnection.GlobalTypeMapper.MapEnum("application.organization_role");
NpgsqlConnection.GlobalTypeMapper.MapEnum("report.pile_type");
- NpgsqlConnection.GlobalTypeMapper.MapEnum("report.project_sample_status");
NpgsqlConnection.GlobalTypeMapper.MapEnum("report.quality");
NpgsqlConnection.GlobalTypeMapper.MapEnum("report.recovery_document_type");
NpgsqlConnection.GlobalTypeMapper.MapEnum("report.recovery_status");
diff --git a/src/FunderMaps.Data/Repositories/IncidentRepository.cs b/src/FunderMaps.Data/Repositories/IncidentRepository.cs
index 308b8c0df..6828b7050 100644
--- a/src/FunderMaps.Data/Repositories/IncidentRepository.cs
+++ b/src/FunderMaps.Data/Repositories/IncidentRepository.cs
@@ -135,26 +135,26 @@ public static void MapToWriter(DbContext context, Incident entity)
public static Incident MapFromReader(DbDataReader reader, int offset = 0)
=> new()
{
- Id = reader.GetSafeString(offset + 0),
- FoundationType = reader.GetFieldValue(offset + 1),
- ChainedBuilding = reader.GetBoolean(offset + 2),
- Owner = reader.GetBoolean(offset + 3),
- FoundationRecovery = reader.GetBoolean(offset + 4),
- NeighborRecovery = reader.GetBoolean(offset + 5),
- FoundationDamageCause = reader.GetFieldValue(offset + 6),
- DocumentFile = reader.GetSafeFieldValue(offset + 7),
- Note = reader.GetSafeString(offset + 8),
- InternalNote = reader.GetSafeString(offset + 9),
- Email = reader.GetSafeString(offset + 10),
- CreateDate = reader.GetDateTime(offset + 11),
- UpdateDate = reader.GetSafeDateTime(offset + 12),
- DeleteDate = reader.GetSafeDateTime(offset + 13),
- FoundationDamageCharacteristics = reader.GetSafeFieldValue(offset + 14),
- EnvironmentDamageCharacteristics = reader.GetSafeFieldValue(offset + 15),
- Address = reader.GetSafeString(offset + 16),
- AuditStatus = reader.GetFieldValue(offset + 17),
- QuestionType = reader.GetFieldValue(offset + 18),
- Meta = reader.GetFieldValue