Skip to main content

hr.room_amenities

Schema: hr
English table: hr.room_amenities
Italian original table: hr.in_riu_properties_luoghi
Description: Link table between rooms and properties, specifying the quantity of each amenity available in a specific room.

Overview

  • Columns: 8
  • Primary key: id
  • Outgoing foreign keys: 3
  • Incoming foreign keys: 0
  • Indexes: 4

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOSurrogate primary key.
ra_idriulpl_idintegerNOIdentifier of the related ra record.
ra_room_idriulpl_riul_idintegerNOIdentifier of the related ra room record.
ra_property_idriulpl_riup_idintegerNOIdentifier of the related ra property record.
ra_quantityriulpl_prp_qtaintegerNOThe number of units available for the associated property in this room (e.g., 10 chairs).
tenant_idtenant_idintegerYESTenant identifier for data isolation.
colcustomcolcustomjsonbYES'{}'::jsonbJSON payload containing additional attributes.
_deleted_deletedbooleanYESfalseFlag indicating whether the record is soft-deleted.

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_ra_propertyra_property_id, tenant_idhr.room_propertiesrp_id, tenant_idRESTRICTRESTRICT
fk_ra_roomra_room_id, tenant_idhr.roomsrm_id, tenant_idRESTRICTRESTRICT
fk_ra_tenanttenant_idcloud.tenantsten_internal_idRESTRICTCASCADE

Referenced by

No incoming foreign keys found.

Constraints

  • Primary key: pk_room_amenitiesid
  • Unique: uk_room_amenities_idra_id, tenant_id

Indexes

NameUniqueMethodColumns / expression
idx_ra_id_tenantNObtreetenant_id, ra_id) WHERE (_deleted = false
idx_ra_property_tenantNObtreetenant_id, ra_property_id) WHERE (_deleted = false
idx_ra_room_tenantNObtreetenant_id, ra_room_id) WHERE (_deleted = false
idx_ra_tenantNObtreetenant_id