CREATE TABLE REC_LOAN_LAST."credit_records_info" (
	"id" VARCHAR(64) NOT NULL,
	"prd_no" VARCHAR(128),
	"prd_name" VARCHAR(256),
	"credit_channel" VARCHAR(10),
	"send_total" VARCHAR(50),
	"back_total" VARCHAR(50),
	"retrieval_rate" VARCHAR(50),
	"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_records_info IS '征信产品基本配置表';
COMMENT ON COLUMN credit_records_info.prd_no IS '征信产品标号';
COMMENT ON COLUMN credit_records_info.prd_name IS '征信产品名称标号';
COMMENT ON COLUMN credit_records_info.credit_channel IS '征信渠道  10-朴道 20-百行';
COMMENT ON COLUMN credit_records_info.send_total IS '使用量';
COMMENT ON COLUMN credit_records_info.back_total IS '返回量';
COMMENT ON COLUMN credit_records_info.retrieval_rate IS '查的率';
COMMENT ON COLUMN credit_records_info.total_cost IS '总费用';

CREATE UNIQUE INDEX INDEXPRDNO ON REC_LOAN_LAST."credit_records_info" ("prd_no");



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.update_user IS '更新人';
COMMENT ON COLUMN credit_prd_config.url IS '请求地址';