CREATE TABLE IF NOT EXISTS "chain_block_certificate" (
    "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
    "chain_operate_id" varchar NOT NULL,
    "operate_type" varchar NOT NULL,
    "operate_name" varchar,
    "batch_id" varchar,
    "batchType" varchar NOT NULL GENERATED BY DEFAULT AS IDENTITY,
    "link_id" varchar,
    "link_name" varchar,
    "chain_name" varchar,
    "chain_block" varchar,
    "block_time" datetime,
    "chain_block_identity" varchar,
    "chain_state" varchar NOT NULL,
    "chain_status" varchar,
    "remarks" varchar,
    "upload_user" varchar,
    "upload_verify" varchar,
    "upload_time" datetime,
    "upload_location" varchar,
    "belong_business_id" bigint NOT NULL,
    "belong_business_name" varchar NOT NULL,
    "tenant_id" bigint NOT NULL,
    "deleted" bit NOT NULL DEFAULT FALSE,
    PRIMARY KEY ("id")
) COMMENT '区块证书';

CREATE TABLE IF NOT EXISTS "chain_operate_detail" (
    "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
    "chain_operate_id" varchar NOT NULL,
    "title" varchar NOT NULL,
    "type" int NOT NULL,
    "content" varchar NOT NULL,
    "link_text" varchar,
    "operate_info" varchar NOT NULL,
    "add_time" datetime,
    "belong_business_id" bigint NOT NULL,
    "belong_business_name" varchar NOT NULL,
    "tenant_id" bigint NOT NULL,
    "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    "deleted" bit NOT NULL DEFAULT FALSE,
    "creator" varchar DEFAULT '',
    "updater" varchar DEFAULT '',
    PRIMARY KEY ("id")
) COMMENT '区块上链操作具体上链信息';



