
CREATE TABLE REC_LOAN_LAST."credit_prd_config" (
	"id" VARCHAR(64) NOT NULL,
	"prd_no" VARCHAR(128),
	"prd_name" VARCHAR(256),
	"credit_channel" VARCHAR(10),
	"update_rate" VARCHAR(10),
	"url" VARCHAR(256),
	"update_user" VARCHAR(50),
	"unit_price" DEC,
	"effective_time" TIMESTAMP,
	"is_effective" VARCHAR(10),
	"create_date" DATE,
	"create_time" TIMESTAMP,
	"update_date" DATE,
	"update_time" TIMESTAMP,
	CONSTRAINT "credit_prd_config" PRIMARY KEY ("id")
);
COMMENT ON TABLE credit_prd_config IS '征信产品基本配置表';
COMMENT ON COLUMN credit_prd_config.prd_no IS '征信产品标号';
COMMENT ON COLUMN credit_prd_config.prd_name IS '征信产品名称标号';
COMMENT ON COLUMN credit_prd_config.credit_channel IS '征信渠道  10-朴道 20-百行';
COMMENT ON COLUMN credit_prd_config.update_rate IS '更新频率';
COMMENT ON COLUMN credit_prd_config.effective_time IS '生效时间';
COMMENT ON COLUMN credit_prd_config.is_effective IS '是否立即生效 10-立即 20-定时';
COMMENT ON COLUMN credit_prd_config.unit_price IS '单价';
COMMENT ON COLUMN credit_prd_config.url IS '请求征信地址';
COMMENT ON COLUMN credit_prd_config.update_user IS '更新人';
CREATE UNIQUE INDEX INDEXCONFIGPRDNO ON REC_LOAN_LAST."credit_prd_config" ("prd_no");

CREATE TABLE REC_LOAN_LAST."credit_prd_info" (
	"id" VARCHAR(64) NOT NULL,
	"prd_no" VARCHAR(128),
	"prd_name" VARCHAR(256),
	"credit_channel" VARCHAR(10),
	"send_total" VARCHAR(500),
	"back_total" VARCHAR(500),
	"retrieval_rate" VARCHAR(20),
	"total_cost" DEC,
	"create_date" DATE,
	"create_time" TIMESTAMP,
	"update_date" DATE,
	"update_time" TIMESTAMP,
	CONSTRAINT "credit_prd_info" PRIMARY KEY ("id")
);
COMMENT ON TABLE credit_prd_info IS '征信产品数据信息表';
COMMENT ON COLUMN credit_prd_info.prd_no IS '征信产品标号';
COMMENT ON COLUMN credit_prd_info.prd_name IS '征信产品名称标号';
COMMENT ON COLUMN credit_prd_info.credit_channel IS '征信渠道  10-朴道 20-百行';
COMMENT ON COLUMN credit_prd_info.send_total IS '使用量';
COMMENT ON COLUMN credit_prd_info.back_total IS '返回量';
COMMENT ON COLUMN credit_prd_info.retrieval_rate IS '查的率';
COMMENT ON COLUMN credit_prd_info.total_cost IS '总费用';
CREATE UNIQUE INDEX INDEXPRDNO ON REC_LOAN_LAST."credit_prd_info" ("prd_no");

CREATE TABLE REC_LOAN_LAST."credit_user_info" (
	"id" VARCHAR(64) NOT NULL,
	"user_no" VARCHAR(128),
	"user_name" VARCHAR(128),
	"credit_channel" VARCHAR(10),
	"send_total" VARCHAR(500),
	"back_total" VARCHAR(500),
	"retrieval_rate" VARCHAR(20),
	"total_cost" DEC,
	"create_date" DATE,
	"create_time" TIMESTAMP,
	"update_date" DATE,
	"update_time" TIMESTAMP,
	CONSTRAINT "credit_user_info" PRIMARY KEY ("id")
);

COMMENT ON TABLE credit_user_info IS '征信用户数据信息表';
COMMENT ON COLUMN credit_user_info.user_no IS '征信产品标号';
COMMENT ON COLUMN credit_user_info.user_name IS '征信产品名称标号';
COMMENT ON COLUMN credit_user_info.credit_channel IS '征信渠道  10-朴道 20-百行';
COMMENT ON COLUMN credit_user_info.send_total IS '使用量';
COMMENT ON COLUMN credit_user_info.back_total IS '返回量';
COMMENT ON COLUMN credit_user_info.retrieval_rate IS '查的率';
COMMENT ON COLUMN credit_user_info.total_cost IS '总费用';
CREATE UNIQUE INDEX INDEXUSERPRDNO ON REC_LOAN_LAST."credit_user_info" ("user_no");

CREATE TABLE REC_LOAN_LAST."bth_credit_month_report" (
	"id" VARCHAR(64) NOT NULL,
	"month_date" VARCHAR(50),
	"credit_channel" VARCHAR(10),
	"send_total" VARCHAR(500),
	"back_total" VARCHAR(500),
	"retrieval_rate" VARCHAR(20),
	"total_cost" DEC,
	"check_results" VARCHAR(10),
	"remarks" VARCHAR(500),
	"create_date" DATE,
	"create_time" TIMESTAMP,
	"update_date" DATE,
	"update_time" TIMESTAMP,
	CONSTRAINT "bth_credit_month_report" PRIMARY KEY ("id")
);
COMMENT ON TABLE bth_credit_month_report IS '征信记录月报表';
COMMENT ON COLUMN bth_credit_month_report.month_date IS '月份';
COMMENT ON COLUMN bth_credit_month_report.credit_channel IS '征信渠道  10-朴道 20-百行';
COMMENT ON COLUMN bth_credit_month_report.send_total IS '使用量';
COMMENT ON COLUMN bth_credit_month_report.back_total IS '返回量';
COMMENT ON COLUMN bth_credit_month_report.retrieval_rate IS '查的率';
COMMENT ON COLUMN bth_credit_month_report.total_cost IS '总费用';
COMMENT ON COLUMN bth_credit_month_report.total_cost IS '对账结果 10-一致 20-不一致';
COMMENT ON COLUMN bth_credit_month_report.remarks IS '备注';

CREATE UNIQUE INDEX INDEXCREATEDATE ON REC_LOAN_LAST."bth_credit_month_report" ("create_date");