

-------------------------------------------------------------------------------
--  oss bucket
-------------------------------------------------------------------------------
CREATE TABLE OSS_BUCKET(
    ID BIGINT NOT NULL,
    CODE VARCHAR(50),
    NAME VARCHAR(200),
    STATUS VARCHAR(50),
    CREATE_TIME TIMESTAMP,
    DESCRIPTION VARCHAR(200),
    USER_ID VARCHAR(64),
    TENANT_ID VARCHAR(50),
    REGION_ID BIGINT,
    CONSTRAINT PK_OSS_BUCKET PRIMARY KEY(ID),
    CONSTRAINT FK_OSS_BUCKET_REGION FOREIGN KEY(REGION_ID) REFERENCES OSS_REGION(ID)
);

COMMENT ON TABLE OSS_BUCKET              IS '存储空间';
COMMENT ON COLUMN OSS_BUCKET.ID          IS '主键';
COMMENT ON COLUMN OSS_BUCKET.CODE        IS '编码（备用）';
COMMENT ON COLUMN OSS_BUCKET.NAME        IS '名称';
COMMENT ON COLUMN OSS_BUCKET.STATUS      IS '状态: active,inactive';
COMMENT ON COLUMN OSS_BUCKET.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN OSS_BUCKET.DESCRIPTION IS '描述(备用)';
COMMENT ON COLUMN OSS_BUCKET.USER_ID     IS '创建人(备用)';
COMMENT ON COLUMN OSS_BUCKET.TENANT_ID   IS '租户';
COMMENT ON COLUMN OSS_BUCKET.REGION_ID   IS '外键';
