Real estate prices – data model, report and permissions

Storage of listings and price history, the source, the report groupings, the two kinds of deletion and the map permission.

Overview

Property listings and their price history; the source is the newsletter of a listing portal, processed by the portal adapter of the e-mail task. Report and chart by settlement, district, neighbourhood and street. There is deliberately no content scope, as this is market data.

Data model

Table names carry the installation's own prefix in the database.

TableRole
realestate_listinglisting (location, building type, deal, type, area, current and first price, status)
realestate_priceprice history
ksh_settlementcounty and NUTS from the settlement register

Functions

  1. List: current price, price per square metre, first price, total change in per cent, price history in the collapsible panel; table existence check (error_table); the bin is shown according to canSeeDeleted().
  2. Report (listing.report, listing.chart): grouping by settlement, district, neighbourhood, street or type; count, average price, average price per square metre, min–max, average area, rose and fell counts; the chart uses the same query.
  3. Move to bin: status = 9; if the user only has the permanent delete right, the header button uses that path.
  4. Permanent delete: physical deletion of the listing and its price history (deleteListings), logged.
  5. Map: link and layer only with map and geo/map::list; geocoding is done by the map module.

Permissions

  • Catalogue seed: install/permission_realestate_v1.sql, map permission install/permission_market_map_v1.sql.
  • list, report, debug, map; deletion by count with canBulkAction(): statusdelete / bulkstatusdelete, delete / bulkdelete, plus the basic modify right.
Related topics: property market permissions