-- 新增預約單通知歷程table
|
|
CREATE TABLE public.appointment_notice_log (
|
id bigserial NOT NULL,
|
appointment_id bigserial NOT NULL,
|
email varchar NULL,
|
phone varchar NULL,
|
"content" varchar NULL,
|
created_date timestamp NULL,
|
CONSTRAINT appointment_notice_log_pkey PRIMARY KEY (id)
|
);
|
|
|
-- 新增預約單備註table
|
|
CREATE TABLE public.appointment_memo (
|
id bigserial NOT NULL,
|
"content" varchar NOT NULL,
|
appointment_id int8 NOT NULL,
|
created_date timestamp NOT NULL,
|
created_by varchar NOT NULL,
|
last_modified_date timestamp NOT NULL,
|
last_modified_by varchar NOT NULL,
|
CONSTRAINT appointment_memo_pkey PRIMARY KEY (id)
|
);
|
|
|
-- 新增約訪紀錄table
|
|
CREATE TABLE public.interview_record (
|
id bigserial NOT NULL,
|
created_date timestamp NOT NULL,
|
created_by varchar NOT NULL,
|
last_modified_date timestamp NOT NULL,
|
last_modified_by varchar NOT NULL,
|
"content" varchar NULL,
|
interview_date timestamp NULL,
|
appointment_id bigserial NOT NULL,
|
status varchar NULL,
|
CONSTRAINT interview_record_pkey PRIMARY KEY (id)
|
);
|
|
-- 新增預約單結案資料table
|
|
-- Drop table
|
|
-- DROP TABLE public.appointment_closed_info;
|
|
-- Drop table
|
|
-- DROP TABLE public.appointment_closed_info;
|
|
CREATE TABLE public.appointment_closed_info (
|
id bigserial NOT NULL,
|
policyholder_identity_id varchar NULL,
|
plan_code varchar NULL,
|
policy_entry_date date NULL,
|
remark varchar NULL,
|
closed_reason varchar NULL,
|
closed_other_reason varchar NULL,
|
appointment_id bigserial NOT NULL,
|
CONSTRAINT appointment_closed_info_pkey PRIMARY KEY (id)
|
);
|