

-------------------------------------------------------------------------------
--  oss metadata
-------------------------------------------------------------------------------
CREATE TABLE OSS_METADATA(
    ID BIGINT NOT NULL,
    CODE VARCHAR(50),
    NAME VARCHAR(200),
    VALUE VARCHAR(200),
    STATUS VARCHAR(50),
    CREATE_TIME TIMESTAMP,
    DESCRIPTION VARCHAR(200),
    USER_ID VARCHAR(64),
    TENANT_ID VARCHAR(50),
    OBJECT_ID BIGINT,
    CONSTRAINT PK_OSS_METADATA PRIMARY KEY(ID),
    CONSTRAINT FK_OSS_METADATA_OBJECT FOREIGN KEY(OBJECT_ID) REFERENCES OSS_OBJECT(ID)
);

COMMENT ON TABLE OSS_METADATA              IS '元数据';
COMMENT ON COLUMN OSS_METADATA.ID          IS '主键';
COMMENT ON COLUMN OSS_METADATA.CODE        IS '编码（备用）';
COMMENT ON COLUMN OSS_METADATA.NAME        IS '名称';
COMMENT ON COLUMN OSS_METADATA.VALUE       IS '数值';
COMMENT ON COLUMN OSS_METADATA.STATUS      IS '状态: active,inactive';
COMMENT ON COLUMN OSS_METADATA.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN OSS_METADATA.DESCRIPTION IS '描述(备用)';
COMMENT ON COLUMN OSS_METADATA.USER_ID     IS '创建人(备用)';
COMMENT ON COLUMN OSS_METADATA.TENANT_ID   IS '租户';
COMMENT ON COLUMN OSS_METADATA.OBJECT_ID   IS '外键';
