保誠-保戶業務員媒合平台
Tomas
2022-01-12 aa84ac15ed832152d080f60320d3647c4b870a80
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
-- 新增預約單通知歷程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)
);