followup

105 rows


Description

Create by KenG (2020/03/11), Master table for follow up

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id int4 10 null
followup_comments.followup_id fk_followup_comments_followup_id C
followup_seen.followup_id fk_followup_seen_followup_id C
user_alerts.followup_id fk_user_alerts_followup_id C
ref_type t_ref_type 2147483647 null

Type of id such as type=booking ref_id is booking_id from table booking or type=register is register_id from table registration

ref_id int4 10 null

ID base on type

title text 2147483647 null
message text 2147483647 null
followup_category_id int4 10 null
followup_category.id fk_followup_followup_category_id R
followup_status_id int4 10 null
followup_status.id fk_followup_followup_status_id R
assign_users _text 2147483647 null
alert_date date 13 null
create_user text 2147483647 null

username of user from authen

create_time timestamptz 35,6 CURRENT_TIMESTAMP
modify_time timestamptz 35,6 null
profile_user text 2147483647 null
alert_pages_id _int4 10 null
booking_id int4 10 CASE ref_type WHEN 'booking'::t_ref_type THEN ref_id ELSE NULL::integer END
register_id int4 10 CASE ref_type WHEN 'register'::t_ref_type THEN ref_id ELSE NULL::integer END

Indexes

Constraint Name Type Sort Column(s)
pk_followup Primary key Asc id
idx_followup_ref_id Performance Asc ref_id
idx_followup_ref_type Performance Asc ref_type
idx_followup_reference Performance Asc/Asc ref_type + ref_id

Relationships