

-------------------------------------------------------------------------------
--  oss access
-------------------------------------------------------------------------------
CREATE TABLE OSS_ACCESS(
    ID BIGINT NOT NULL,
    TYPE VARCHAR(50),
    ACCESS_KEY VARCHAR(100),
    SECRET_KEY VARCHAR(100),
    STATUS VARCHAR(50),
    CREATE_TIME TIMESTAMP,
    DESCRIPTION VARCHAR(200),
    USER_ID VARCHAR(64),
    TENANT_ID VARCHAR(50),
    BUCKET_ID BIGINT,
    CONSTRAINT PK_OSS_ACCESS PRIMARY KEY(ID),
    CONSTRAINT FK_OSS_ACCESS_BUCKET FOREIGN KEY(BUCKET_ID) REFERENCES OSS_BUCKET(ID)
);

COMMENT ON TABLE OSS_ACCESS              IS '访问秘钥';
COMMENT ON COLUMN OSS_ACCESS.ID          IS '主键';
COMMENT ON COLUMN OSS_ACCESS.TYPE        IS '类型（备用）';
COMMENT ON COLUMN OSS_ACCESS.ACCESS_KEY  IS '账号';
COMMENT ON COLUMN OSS_ACCESS.SECRET_KEY  IS '密码';
COMMENT ON COLUMN OSS_ACCESS.STATUS      IS '状态: active,inactive';
COMMENT ON COLUMN OSS_ACCESS.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN OSS_ACCESS.DESCRIPTION IS '描述(备用)';
COMMENT ON COLUMN OSS_ACCESS.USER_ID     IS '创建人(备用)';
COMMENT ON COLUMN OSS_ACCESS.TENANT_ID   IS '租户';
COMMENT ON COLUMN OSS_ACCESS.BUCKET_ID   IS '外键';
