recreation_asset

-1 rows


Description

Individualised asset entities with parent-child relationships (e.g., Campsite → Table). Geometry stored in recreation_asset_geom.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
asset_id int8 19 null
recreation_asset.parent_id fk_asset_parent R
recreation_asset_geom.asset_id fk_asset_geom_asset C
recreation_asset_repair.asset_id fk_repair_asset C

Unique surrogate identifier for the individual asset.

parent_id int8 19 null
recreation_asset.asset_id fk_asset_parent R

ID of the parent container asset (e.g., Campsite, Day Use Area, Zone). NULL if top-level.

asset_tag varchar 50 null

Physical barcode, field tag, or campsite designation (e.g., CS-012, TBL-012-A).

rec_resource_id varchar 20 null
recreation_resource.rec_resource_id fk_asset_rec_resource R

FK to the parent Recreation Resource / Site (rst.recreation_resource).

asset_code int4 10 null
recreation_asset_code.asset_code fk_asset_asset_code R

Asset classification type (FK to rst.recreation_asset_code.asset_code).

asset_name varchar 200 null

Optional display name for the asset. UI defaults to asset_code description when null.

asset_comment text 2147483647 null

Free-text note or migrated structure_name value for this asset.

legacy_structure_id varchar 20 null

Informational string reference to the legacy aggregate recreation_structure record.

asset_length numeric 7,1 null

Total length in metres (paths, boardwalks, fences, bridges).

asset_width numeric 7,1 null

Total width in metres (parking areas, shelters, docks).

asset_area numeric 7,1 null

Total area in square metres.

default_value numeric 7,2 null

Default value for the asset, derived from the structure type value/dimension.

actual_value numeric 7,2 null

Actual value of the asset; takes precedence over the default value when set.

installation_date date 13 null

Date the asset was installed in the field.

updated_at timestamp 29,6 now()
updated_by text 2147483647 null
created_at timestamp 29,6 now()
created_by text 2147483647 null
sys_period tstzrange 2147483647 tstzrange(CURRENT_TIMESTAMP, NULL::timestamp with time zone)

Indexes

Constraint Name Type Sort Column(s)
recreation_asset_pkey Primary key Asc asset_id
idx_recreation_asset_code Performance Asc asset_code
idx_recreation_asset_parent_id Performance Asc parent_id
idx_recreation_asset_site Performance Asc rec_resource_id

Check Constraints

Constraint Name Constraint
chk_no_self_parent (parent_id <> asset_id)

Relationships