

-------------------------------------------------------------------------------
--  sys entry
-------------------------------------------------------------------------------
CREATE TABLE SYS_ENTRY(
    ID BIGINT NOT NULL,
    LOGO VARCHAR(200),
    TYPE VARCHAR(50),
    CODE VARCHAR(50),
    NAME VARCHAR(50),
    URL VARCHAR(200),
    PRIORITY INTEGER,
    STATUS VARCHAR(50),
    DESCN VARCHAR(200),
    CATEGORY_ID BIGINT,
    PLATFORM VARCHAR(50),
    CREATE_TIME TIMESTAMP,
    USER_ID VARCHAR(64),
    SYS_ID BIGINT,

    TENANT_ID VARCHAR(64),

    CONSTRAINT PK_SYS_ENTRY PRIMARY KEY(ID),
    CONSTRAINT FK_SYS_ENTRY_SYS FOREIGN KEY(SYS_ID) REFERENCES SYS_INFO(ID),
    CONSTRAINT FK_SYS_ENTRY_CATEGORY FOREIGN KEY(CATEGORY_ID) REFERENCES SYS_CATEGORY(ID)
);

COMMENT ON TABLE SYS_ENTRY IS '系统入口';
COMMENT ON COLUMN SYS_ENTRY.ID IS '主键';
COMMENT ON COLUMN SYS_ENTRY.LOGO IS '图标';
COMMENT ON COLUMN SYS_ENTRY.TYPE IS '分类';
COMMENT ON COLUMN SYS_ENTRY.CODE IS '编码';
COMMENT ON COLUMN SYS_ENTRY.NAME IS '名称';
COMMENT ON COLUMN SYS_ENTRY.URL IS '网址';
COMMENT ON COLUMN SYS_ENTRY.PRIORITY IS '排序';
COMMENT ON COLUMN SYS_ENTRY.STATUS IS '状态';
COMMENT ON COLUMN SYS_ENTRY.DESCN IS '备注';
COMMENT ON COLUMN SYS_ENTRY.CATEGORY_ID IS '外键，系统分类';
COMMENT ON COLUMN SYS_ENTRY.PLATFORM IS '平台，web, app';
COMMENT ON COLUMN SYS_ENTRY.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN SYS_ENTRY.USER_ID IS '创建人';
COMMENT ON COLUMN SYS_ENTRY.SYS_ID IS '外键，系统';
COMMENT ON COLUMN SYS_ENTRY.TENANT_ID IS '租户';


