

-------------------------------------------------------------------------------
--  oss object
-------------------------------------------------------------------------------
CREATE TABLE OSS_OBJECT(
    ID BIGINT NOT NULL,
    CODE VARCHAR(50),
    NAME VARCHAR(200),
    PATH VARCHAR(200),
    SIZE BIGINT,
    STATUS VARCHAR(50),
    CREATE_TIME TIMESTAMP,
    DESCRIPTION VARCHAR(200),
    USER_ID VARCHAR(64),
    TENANT_ID VARCHAR(50),
    BUCKET_ID BIGINT,
    CONSTRAINT PK_OSS_OBJECT PRIMARY KEY(ID),
    CONSTRAINT FK_OSS_OBJECT_BUCKET FOREIGN KEY(BUCKET_ID) REFERENCES OSS_BUCKET(ID)
);

COMMENT ON TABLE OSS_OBJECT              IS '对象文件';
COMMENT ON COLUMN OSS_OBJECT.ID          IS '主键';
COMMENT ON COLUMN OSS_OBJECT.CODE        IS '编码（备用）';
COMMENT ON COLUMN OSS_OBJECT.NAME        IS '文件原名称';
COMMENT ON COLUMN OSS_OBJECT.PATH        IS '路径';
COMMENT ON COLUMN OSS_OBJECT.SIZE        IS '大小';
COMMENT ON COLUMN OSS_OBJECT.STATUS      IS '状态: active,inactive';
COMMENT ON COLUMN OSS_OBJECT.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN OSS_OBJECT.DESCRIPTION IS '描述(备用)';
COMMENT ON COLUMN OSS_OBJECT.USER_ID     IS '创建人(备用)';
COMMENT ON COLUMN OSS_OBJECT.TENANT_ID   IS '租户';
COMMENT ON COLUMN OSS_OBJECT.BUCKET_ID   IS '外键';
