-- 新增預約單通知歷程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)
);

