CREATE TABLE SYS_QUESTIONNAIRE
  (
    ID             NUMBER(18)  NOT NULL,
    TITLE          VARCHAR2(500),
    HEAD_CONTENT   VARCHAR2(2000),
    FOOT_CONTENT   VARCHAR2(2000),
    MEMO           VARCHAR2(4000),
    STATUS         NUMBER(18),
    CREATOR_ID     NUMBER(18),
    CREATOR_ORG_ID NUMBER(18),
    CREATE_DATE DATE,
    QN_TEMPLATE_EDIT VARCHAR2(500),
    QN_TEMPLATE_GET  VARCHAR2(500),
    PRIMARY KEY (ID) 
  );
  
  
  CREATE TABLE SYS_ANSWER
  (
    ID               NUMBER(18,0) NOT NULL,
    QUESTIONNAIRE_ID NUMBER(18,0),
    STATUS           NUMBER(18,0),
    CREATOR_ID       NUMBER(18,0),
    CREATOR_ORG_ID   NUMBER(18,0),
    CREATE_DATE DATE,
    PRIMARY KEY (ID)
  );
  
  
  
  CREATE TABLE HY_VOTE
  (
    ID          NUMBER(18,0) NOT NULL,
    TITLE       VARCHAR2(180),
    CONTENT     VARCHAR2(1800),
    IS_REQUIRED NUMBER(18),
    IS_OPEN     NUMBER(18),
    NUM         NUMBER(18),
    EXPIRE_DATE DATE,
    STATUS         NUMBER(18),
    SCORE          NUMBER(18),
    CREATOR_ID     NUMBER(18),
    CREATOR_ORG_ID NUMBER(18),
    CREATE_TIME DATE,
    PRIMARY KEY (ID) 
  );

  
  
  
  CREATE TABLE HY_VOTE_RESULT
  (
    ID             NUMBER(18) NOT NULL,
    HY_VOTE_ID     NUMBER(18),
    HY_VOTE_OBJ_ID NUMBER(18),
    SCORE          NUMBER(18),
    USER_ID        NUMBER(18),
    ORG_ID         NUMBER(18),
    VOTE_TIME DATE,
    PRIMARY KEY (ID)
  );
  
  
  
  CREATE TABLE SYS_JOB_PARAM
  (
    ID    NUMBER(18) NOT NULL,
    JOBID NUMBER(18),
    KEY   VARCHAR2(50),
    VALUE VARCHAR2(50),
    PRIMARY KEY (ID) 
  );
  
  
  /*==============================================================*/
/* Table: SYS_PLAN_COMMENT                                      */
/*==============================================================*/
CREATE TABLE SYS_PLAN_COMMENT 
(
   ID                   INTEGER NOT NULL,
   PLANID               INTEGER,
   SUBMITID             INTEGER,
   SUBMITOR             VARCHAR2(50),
   DOC                  VARCHAR2(400),
   COMMENTCONTENT       VARCHAR2(4000),
   COMMENTGRADE         VARCHAR2(50),
   CREATETIME           TIMESTAMP,
   PRIMARY KEY (ID) 
);

COMMENT ON COLUMN SYS_PLAN_COMMENT.ID IS
'主键ID';

COMMENT ON COLUMN SYS_PLAN_COMMENT.PLANID IS
'日程ID';

COMMENT ON COLUMN SYS_PLAN_COMMENT.SUBMITID IS
'评论人ID';

COMMENT ON COLUMN SYS_PLAN_COMMENT.SUBMITOR IS
'评论人';

COMMENT ON COLUMN SYS_PLAN_COMMENT.DOC IS
'相关文件';

COMMENT ON COLUMN SYS_PLAN_COMMENT.COMMENTCONTENT IS
'评论内容';

COMMENT ON COLUMN SYS_PLAN_COMMENT.COMMENTGRADE IS
'评论分数';

COMMENT ON COLUMN SYS_PLAN_COMMENT.CREATETIME IS
'提交时间';


CREATE TABLE SYS_PLAN_SHARE 
(
   ID                 NUMBER(18,0)         NOT NULL,
   USERID             NUMBER(18,0),
   SHAREUSERID        NUMBER(18,0),
   SHAREUSERNAME      VARCHAR2(50),
   CONSTRAINT PK_SYS_PLAN_SHARE PRIMARY KEY (ID)
);

COMMENT ON COLUMN SYS_PLAN_SHARE."ID" IS
'主键';

COMMENT ON COLUMN SYS_PLAN_SHARE."USERID" IS
'用户ID';

COMMENT ON COLUMN SYS_PLAN_SHARE."SHAREUSERID" IS
'下属用户ID';

COMMENT ON COLUMN SYS_PLAN_SHARE."SHAREUSERNAME" IS
'下属用户名';

CREATE TABLE SYS_JIEJIARI 
(
   HO_ID                NUMBER(18,0)         NOT NULL,
   HO_NAME              VARCHAR2(50),
   HO_DATE              DATE,
   HO_TYPE              NUMBER(18),
   HO_MONTH             VARCHAR2(50),
   HO_YEAR              VARCHAR2(50),
   CONSTRAINT PK_SYS_JIEJIARI PRIMARY KEY (HO_ID)
);

COMMENT ON COLUMN SYS_JIEJIARI.HO_ID IS
'主键ID';

COMMENT ON COLUMN SYS_JIEJIARI.HO_NAME IS
'名称';

COMMENT ON COLUMN SYS_JIEJIARI.HO_DATE IS
'日期';

COMMENT ON COLUMN SYS_JIEJIARI.HO_TYPE IS
'类型0：工作日  1：节假日';

COMMENT ON COLUMN SYS_JIEJIARI.HO_MONTH IS
'月份';

COMMENT ON COLUMN SYS_JIEJIARI.HO_YEAR IS
'年份';



CREATE TABLE SYS_BULLETINS
  (
    ID            NUMBER(18,0) NOT NULL,
    BULLENTINID   NUMBER(18,0),
    PERSONNELID   NUMBER(18,0),
    PERSONNELNAME VARCHAR2(50),
    ISREAD       NUMBER(*,0),
    PRIMARY KEY (ID) 
  )
 
COMMENT ON COLUMN SYS_BULLETINS.ID
IS '主键ID';
  COMMENT ON COLUMN SYS_BULLETINS.BULLENTINID
IS '公告ID';
  COMMENT ON COLUMN SYS_BULLETINS.PERSONNELID
IS '人员ID';
  COMMENT ON COLUMN SYS_BULLETINS.PERSONNELNAME
IS '人员名称';
  COMMENT ON COLUMN SYS_BULLETINS.ISREAD
IS '是否已读';