client_addresses


Columns

Column Type Size Nulls Auto Default Children Parents Comments
id VARCHAR 36 null
location_business_line_id VARCHAR 36 null
client_id VARCHAR 36 null
clients.id fk_client_addresses_client R
address_id VARCHAR 36 null
addresses.id fk_client_addresses_address R
place_of_service_id VARCHAR 36 √ null
place_of_service.id fk_client_addresses_pos R
allowed_start_time TIME 8 √ null

Earliest time encounters can start

allowed_end_time TIME 8 √ null

Latest time encounters can end

allowed_days_mask INT 10 √ null

Bitmask: Sun=1, Mon=2, Tue=4, Wed=8, Thu=16, Fri=32, Sat=64

is_primary BIT 1 0
is_active BIT 1 1
created_at TIMESTAMP 19 CURRENT_TIMESTAMP
created_by VARCHAR 255 √ null
updated_at TIMESTAMP 19 CURRENT_TIMESTAMP
updated_by VARCHAR 255 √ null

Indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
idx_client_addresses_active Performance Asc is_active
idx_client_addresses_address Performance Asc address_id
idx_client_addresses_client Performance Asc client_id
idx_client_addresses_location Performance Asc location_business_line_id
idx_client_addresses_pos Performance Asc place_of_service_id
uk_client_address Must be unique Asc/Asc client_id + address_id

Relationships