drop table DR_CONTROLLER;

drop table DR_DOOR;

drop table DR_READER;

drop table EV_ATTACH_LOG;

drop index Index_1 on EV_CARD;

drop table EV_CARD;

drop index Index_1 on EV_CARD_READ_LOG;

drop table EV_CARD_READ_LOG;

drop table EV_DICT;

drop table EV_EVENT_LOG;

drop index Index_3 on EV_GROUP_DETAIL;

drop index Index_2 on EV_GROUP_DETAIL;

drop index Index_1 on EV_GROUP_DETAIL;

drop table EV_GROUP_DETAIL;

drop table EV_GUEST_ORG;

drop index Index_1 on EV_HOST;

drop table EV_HOST;

drop index Index_1 on EV_IMAGE;

drop table EV_IMAGE;

drop index Index_7 on EV_INFO_EXT;

drop index Index_6 on EV_INFO_EXT;

drop index Index_5 on EV_INFO_EXT;

drop index Index_4 on EV_INFO_EXT;

drop index Index_3 on EV_INFO_EXT;

drop index Index_2 on EV_INFO_EXT;

drop index Index_1 on EV_INFO_EXT;

drop table EV_INFO_EXT;

drop index Index_2 on EV_KQ_REC;

drop index Index_1 on EV_KQ_REC;

drop table EV_KQ_REC;

drop table EV_KQ_ROUND;

drop index Index_2 on EV_KQ_STAT;

drop index Index_1 on EV_KQ_STAT;

drop table EV_KQ_STAT;

drop table EV_KQ_WORKDAY;

drop index Index_2 on EV_MAN;

drop index Index_1 on EV_MAN;

drop table EV_MAN;

drop index Index_1 on EV_MAN_GROUP;

drop table EV_MAN_GROUP;

drop table EV_MAN_ID;

drop table EV_MAN_ROLERIGHT;

drop table EV_NOTICE_LIST;

drop table EV_OPER_LOG;

drop index Index_1 on EV_ORG;

drop table EV_ORG;

drop table EV_ROLE_RIGHT;

drop table EV_USER;

drop index Index_3 on EV_VISIT_LOG;

drop table EV_VISIT_LOG;

drop index Index_1 on GS_CARD;

drop table GS_CARD;

drop index Index_2 on GS_CARD_EVENT_LOG;

drop index Index_1 on GS_CARD_EVENT_LOG;

drop table GS_CARD_EVENT_LOG;

drop index Index_2 on GS_CARD_READ_LOG;

drop index Index_1 on GS_CARD_READ_LOG;

drop table GS_CARD_READ_LOG;

drop index Index_3 on GS_INFO;

drop index Index_2 on GS_INFO;

drop index Index_1 on GS_INFO;

drop table GS_INFO;

drop table MT_CHECK;

drop table MT_MAN;

drop table MT_MEET;

drop table MT_ROOM;

drop table MT_SUB;

drop table SYS_MESSAGE;

drop table SYS_SESSION;

create table DR_CONTROLLER
(
    dcid                 COUNTER         not null,
    snid                 VARCHAR(128),
    name                 VARCHAR(128),
    dcType               VARCHAR(8),
    enabled              VARCHAR(8),
    comstr               VARCHAR(128),
    mask                 VARCHAR(20),
    gate                 VARCHAR(20),
    mac                  VARCHAR(128),
    softwareVer          VARCHAR(128),
    createTime           VARCHAR(25),
    syncTime             VARCHAR(25),
    memory               VARCHAR(255),
    reserved             VARCHAR(255),
constraint PK_DR_CONTROLLER primary key (dcid)
);

create table DR_DOOR
(
    doorId               COUNTER         not null,
    dcid                 INTEGER,
    name                 VARCHAR(128),
    doorIndex            INTEGER,
    onlineState          VARCHAR(8),
    openDelay            INTEGER,
    enabled              INTEGER,
    reserved             VARCHAR(255),
constraint PK_DR_DOOR primary key (doorId)
);

create table DR_READER
(
    readerId             COUNTER         not null,
    doorId               NUMERIC,
    name                 VARCHAR(128),
    direction            VARCHAR(8),
    readerIndex          INTEGER,
    timeBook             VARCHAR(8),
    reserved             VARCHAR(255),
constraint PK_DR_READER primary key (readerId)
);

create table EV_ATTACH_LOG
(
    ATTACHID             COUNTER         not null,
    VISITLOGID           INTEGER,
    ATTACHTYPE           VARCHAR(128),
    ATTACHCOUNT          INTEGER,
    MEMORY               VARCHAR(255),
    reserved             VARCHAR(255),
constraint PK_EV_ATTACH_LOG primary key (ATTACHID)
);

create table EV_CARD
(
    CARDRECID            COUNTER         not null,
    CARDID               VARCHAR(20)     not null,
    CARDTYPE             INTEGER,
    USERID               INTEGER,
    RELBIZINFO           VARCHAR(255),
    USERNAME             VARCHAR(128),
    CARDSTATE            INTEGER,
    EFFDATE              VARCHAR(25),
    EXPDATE              VARCHAR(25),
    MEMORY               VARCHAR(255),
    reserved             VARCHAR(255),
constraint PK_EV_CARD primary key (CARDRECID)
);

create  index Index_1 on EV_CARD
(
   CARDID               ASC
);

create table EV_CARD_READ_LOG
(
    READLOGID            COUNTER         not null,
    CARDRECID            INTEGER,
    READDATE             VARCHAR(25)     not null,
    CARDID               VARCHAR(20),
    NAME                 VARCHAR(128),
    CARDTYPE             INTEGER,
    ASSOINFO             VARCHAR(255),
    OPERATORID           INTEGER,
    GUARD                INTEGER         not null,
    recType              VARCHAR(8),
    opDir                VARCHAR(255),
    opResult             VARCHAR(255),
    pic                  VARCHAR(255),
    MEMORY               VARCHAR(255),
    STATE                INTEGER,
    r1                   VARCHAR(255),
    r2                   VARCHAR(255),
    r3                   VARCHAR(255),
constraint PK_EV_CARD_READ_LOG primary key (READLOGID)
);

create  index Index_1 on EV_CARD_READ_LOG
(
   READDATE             ASC
);

create table EV_DICT
(
    DID                  COUNTER         not null,
    RECTYPE              VARCHAR(8),
    DCODE                VARCHAR(128)    not null,
    DKEY                 VARCHAR(128)    not null,
    DNAME                VARCHAR(128),
    DVALUE               VARCHAR(255),
    DGROUP               VARCHAR(255),
    MEMORY               VARCHAR(255),
    WORK                 INTEGER         not null,
    ORDERINDEX           INTEGER,
    reserved             VARCHAR(255),
constraint PK_EV_DICT primary key (DID)
);

create table EV_EVENT_LOG
(
    LOGID                COUNTER         not null,
    OPERATORID           INTEGER,
    GUARD                INTEGER         not null,
    CARDTYPE             INTEGER,
    eventObjectId        VARCHAR(128),
    EVENTTYPE            INTEGER,
    NAME                 VARCHAR(128),
    OCCURDATE            VARCHAR(25),
    EFFDATE              VARCHAR(25),
    EXPDATE              VARCHAR(25),
    MEMORY               VARCHAR(255),
    bizowner             VARCHAR(255),
    recType              VARCHAR(8),
    operated             VARCHAR(255),
    opDir                VARCHAR(255),
    opResult             VARCHAR(255),
    e1                   VARCHAR(255),
    e2                   VARCHAR(255),
    e3                   VARCHAR(255),
constraint PK_EV_EVENT_LOG primary key (LOGID)
);

create table EV_GROUP_DETAIL
(
    DETAILID             COUNTER         not null,
    groupid              INTEGER,
    MANID                INTEGER,
    CREATETIME           VARCHAR(25),
    ORDERINDEX           INTEGER         not null,
constraint PK_EV_GROUP_DETAIL primary key (DETAILID)
);

create  index Index_1 on EV_GROUP_DETAIL
(
   groupid              ASC
);

create  index Index_2 on EV_GROUP_DETAIL
(
   MANID                ASC
);

create unique index Index_3 on EV_GROUP_DETAIL
(
   groupid              ASC,
   MANID                ASC
);

create table EV_GUEST_ORG
(
    ORGID                COUNTER         not null,
    NAME                 VARCHAR(255)    not null,
    ADDRESS              VARCHAR(255),
    PHONE                VARCHAR(255),
    MEMORY               VARCHAR(255),
    GO1                  VARCHAR(255),
    GO2                  VARCHAR(255),
constraint PK_4 primary key (NAME)
);

create table EV_HOST
(
    HOSTID               COUNTER         not null,
    HOSTNAME             VARCHAR(128)    not null,
    PHONE                VARCHAR(128),
    ADDRESS              VARCHAR(128),
    EMAIL                VARCHAR(128),
    H1                   VARCHAR(255),
    H2                   VARCHAR(255),
    H3                   VARCHAR(255),
    H4                   VARCHAR(255),
    H5                   VARCHAR(255),
    recType              VARCHAR(8),
    nbr                  VARCHAR(255),
    state1               VARCHAR(8),
    state2               VARCHAR(8),
    state3               VARCHAR(8),
    ext1                 VARCHAR(255),
    ext2                 VARCHAR(255),
    ext3                 VARCHAR(255),
    ext4                 VARCHAR(255),
    ext5                 VARCHAR(255),
constraint PK_2 primary key (HOSTID)
);

create unique index Index_1 on EV_HOST
(
   HOSTNAME             ASC
);

create table EV_IMAGE
(
    IMAGEID              COUNTER         not null,
    FILEPATH             VARCHAR(255),
    DATA                 GENERAL,
    MEMORY               VARCHAR(255),
    STATE                INTEGER,
constraint PK_EV_IMAGE primary key (IMAGEID)
);

create unique index Index_1 on EV_IMAGE
(
   FILEPATH             ASC
);

create table EV_INFO_EXT
(
    EXTID                COUNTER,
    OBJTYPE              VARCHAR(128),
    OBJID                VARCHAR(128),
    ATTRSRC              VARCHAR(255),
    ATTRTYPE             VARCHAR(128),
    ATTRNAME             VARCHAR(128),
    ATTRVALUE            VARCHAR(128),
    PARENT               INTEGER,
    FILTER               VARCHAR(128),
    ORDERINDEX           INTEGER,
    reserved             VARCHAR(255)
);

create  index Index_1 on EV_INFO_EXT
(
   OBJTYPE              ASC,
   OBJID                ASC
);

create  index Index_2 on EV_INFO_EXT
(
   ATTRSRC              ASC
);

create  index Index_3 on EV_INFO_EXT
(
   ATTRTYPE             ASC
);

create  index Index_4 on EV_INFO_EXT
(
   ATTRNAME             ASC
);

create  index Index_5 on EV_INFO_EXT
(
   ATTRVALUE            ASC
);

create  index Index_6 on EV_INFO_EXT
(
   FILTER               ASC
);

create  index Index_7 on EV_INFO_EXT
(
   PARENT               ASC
);

create table EV_KQ_REC
(
    recId                COUNTER         not null,
    manId                INTEGER         not null,
    dataSrc              VARCHAR(128),
    dataSrcId            VARCHAR(128),
    recDate              VARCHAR(25)     not null,
    beginTime            VARCHAR(25),
    endTime              VARCHAR(25),
    come                 INTEGER,
    leave                INTEGER,
    offday               INTEGER,
    overTime             INTEGER,
    state                INTEGER,
    createTime           VARCHAR(25),
    memory               VARCHAR(255),
    reserved1            VARCHAR(255),
    reserved2            VARCHAR(255),
    reserved3            VARCHAR(255),
    reserved4            VARCHAR(255),
    reserved5            VARCHAR(255),
constraint PK_EV_KQ_REC primary key (recId)
);

create  index Index_1 on EV_KQ_REC
(
   manId                ASC
);

create  index Index_2 on EV_KQ_REC
(
   recDate              ASC
);

create table EV_KQ_ROUND
(
    roundId              COUNTER         not null,
    roundName            VARCHAR(128),
    beginTime            INTEGER,
    endTime              INTEGER,
    memory               VARCHAR(255),
    reserved1            VARCHAR(255),
    reserved2            VARCHAR(255),
    reserved3            VARCHAR(255),
    reserved4            VARCHAR(255),
    reserved5            VARCHAR(255),
constraint PK_EV_KQ_ROUND primary key (roundId)
);

create table EV_KQ_STAT
(
    statId               COUNTER         not null,
    manId                INTEGER         not null,
    cycleTime            VARCHAR(128)    not null,
    absentTimes          INTEGER,
    absentTime           INTEGER,
    payOffdayTimes       INTEGER,
    payOffdayTime        INTEGER,
    noPayOffdayTimes     INTEGER,
    noPayOffdayTime      INTEGER,
    lateTimes            INTEGER,
    lateTime             INTEGER,
    leaveTimes           INTEGER,
    leaveTime            INTEGER,
    nOverTimes           INTEGER,
    nOverTime            INTEGER,
    wOverTimes           INTEGER,
    wOverTime            INTEGER,
    hOverTimes           INTEGER,
    hOverTime            INTEGER,
    memory               VARCHAR(255),
    reserved1            VARCHAR(255),
    reserved2            VARCHAR(255),
    reserved3            VARCHAR(255),
    reserved4            VARCHAR(255),
    reserved5            VARCHAR(255),
constraint PK_EV_KQ_STAT primary key (statId)
);

create  index Index_1 on EV_KQ_STAT
(
   cycleTime            ASC
);

create  index Index_2 on EV_KQ_STAT
(
   manId                ASC
);

create table EV_KQ_WORKDAY
(
    dayId                COUNTER         not null,
    dayGroup             VARCHAR(128),
    dayType              VARCHAR(128),
    dayDate              VARCHAR(25),
    beginTime            INTEGER,
    endTime              INTEGER,
    memory               VARCHAR(255),
    reserved1            VARCHAR(255),
    reserved2            VARCHAR(255),
    reserved3            VARCHAR(255),
    reserved4            VARCHAR(255),
    reserved5            VARCHAR(255),
constraint PK_EV_KQ_WORKDAY primary key (dayId)
);

create table EV_MAN
(
    MANID                COUNTER         not null,
    recType              VARCHAR(8)      not null,
    ORGID                INTEGER,
    LINKTYPECODE         VARCHAR(255)    not null,
    NAME                 VARCHAR(128)    not null,
    LOGINNAME            VARCHAR(128)    not null,
    nbr                  VARCHAR(255),
    PHONE                VARCHAR(128),
    MOBILE               VARCHAR(255),
    EMAIL                VARCHAR(128),
    ADDRESS              VARCHAR(128),
    STATE                INTEGER,
    operState            INTEGER,
    BIZSTATE             VARCHAR(255),
    RECSTATE             VARCHAR(8),
    POSITION             VARCHAR(255),
    CAR                  VARCHAR(255),
    FINGLEPRINT          VARCHAR(255),
    LONGCARD             VARCHAR(255),
    LONGCARDREMAINS      VARCHAR(255),
    REMAIN               VARCHAR(255),
    ASSOMOBILE           VARCHAR(255),
    MSG                  VARCHAR(255),
    PASSWORD             VARCHAR(255),
    MEMORY               VARCHAR(255),
    m1                   VARCHAR(255),
    m2                   VARCHAR(255),
    m3                   VARCHAR(255),
    m4                   VARCHAR(255),
    m5                   VARCHAR(255),
constraint PK_EV_MAN primary key (MANID)
);

create unique index Index_1 on EV_MAN
(
   LOGINNAME            ASC
);

create  index Index_2 on EV_MAN
(
   PHONE                ASC
);

create table EV_MAN_GROUP
(
    groupid              COUNTER         not null,
    recType              VARCHAR(8)      not null,
    name                 VARCHAR(128)    not null,
    createTime           VARCHAR(25),
    memory               VARCHAR(255),
constraint PK_EV_MAN_GROUP primary key (groupid)
);

create  index Index_1 on EV_MAN_GROUP
(
   recType              ASC
);

create table EV_MAN_ID
(
    RECID                COUNTER         not null,
    MANID                INTEGER,
    IDTYPE               VARCHAR(128),
    IDTYPECODE           VARCHAR(128),
    NAME                 VARCHAR(128)    not null,
    KIND                 VARCHAR(128),
    SEX                  VARCHAR(16),
    BIRTHDAY             VARCHAR(25),
    ADDRESS              VARCHAR(255),
    CERT                 VARCHAR(255),
    EFFECT               VARCHAR(25),
    EXPIRE               VARCHAR(25),
    ADDIINFO             VARCHAR(255),
    CARDID               VARCHAR(128)    not null,
    SCANHEADPIC          VARCHAR(255),
    SCANPIC              VARCHAR(255),
    i1                   VARCHAR(255),
    i2                   VARCHAR(255),
    i3                   VARCHAR(255),
constraint PK_EV_MAN_ID primary key (RECID)
);

create table EV_MAN_ROLERIGHT
(
    manRoleRightId       COUNTER         not null,
    manId                INTEGER         not null,
    effectTime           VARCHAR(25),
    expireTime           VARCHAR(25),
    roleRightType        VARCHAR(8),
    roleRightId          INTEGER         not null,
    relayEnabled         INTEGER,
    memory               VARCHAR(255),
    reserved             VARCHAR(255),
constraint PK_EV_MAN_ROLERIGHT primary key (manRoleRightId)
);

create table EV_NOTICE_LIST
(
    NOTICEID             COUNTER         not null,
    ORGNAME              VARCHAR(255),
    CARDTYPE             INTEGER,
    CARDID               VARCHAR(128),
    GUESTNAME            VARCHAR(128),
    NOTICETYPE           INTEGER         not null,
    MEMORY               VARCHAR(255),
    reserved             VARCHAR(255),
constraint PK_3 primary key (NOTICEID, NOTICETYPE)
);

create table EV_OPER_LOG
(
    LOGID                COUNTER         not null,
    USERID               INTEGER,
    OPTIME               VARCHAR(25),
    GUARD                VARCHAR(128),
    MEMORY               VARCHAR(255),
    reserved             VARCHAR(255),
constraint PK_EV_OPER_LOG primary key (LOGID)
);

create table EV_ORG
(
    ORGID                COUNTER         not null,
    RECTYPE              VARCHAR(8)      not null,
    PARENT               INTEGER         not null,
    UNITNAME             VARCHAR(255)    not null,
    NAME                 VARCHAR(255)    not null,
    ADDRESS              VARCHAR(255),
    PHONE                VARCHAR(255),
    MEMORY               VARCHAR(255),
    OLEVEL               VARCHAR(255),
    ROOMSTATE            VARCHAR(255),
    o1                   VARCHAR(255),
    o2                   VARCHAR(255),
    o3                   VARCHAR(255),
constraint PK_1 primary key (ORGID)
);

create unique index Index_1 on EV_ORG
(
   NAME                 ASC
);

create table EV_ROLE_RIGHT
(
    roleRightId          COUNTER         not null,
    roleDid              INTEGER,
    recType              VARCHAR(8),
    rightId              INTEGER,
    memory               VARCHAR(255),
    reserved             VARCHAR(255),
constraint PK_EV_ROLE_RIGHT primary key (roleRightId)
);

create table EV_USER
(
    USERID               COUNTER         not null,
    USERNAME             VARCHAR(128)    not null,
    PASSWORD             VARCHAR(255)    not null,
    PHONE                VARCHAR(255),
    STATE                INTEGER         not null,
    MEMORY               VARCHAR(255),
    MANID                INTEGER,
constraint PK_EV_USER primary key (USERID)
);

create table EV_VISIT_LOG
(
    VISITLOGID           COUNTER         not null,
    RECTYPE              VARCHAR(8),
    BIZCODE              VARCHAR(8),
    BIZSTATE             VARCHAR(8),
    GUESTID              VARCHAR(255),
    GUESTNAME            VARCHAR(255),
    GUESTTYPE            VARCHAR(255),
    RIGHTID              VARCHAR(255),
    RIGHTNAME            VARCHAR(255),
    HOSTID               VARCHAR(255),
    HOSTNAME             VARCHAR(255),
    APPROVER             VARCHAR(128),
    APPROVERNAME         VARCHAR(255),
    CAPTUREPIC           VARCHAR(255),
    CAPTUREID            VARCHAR(255),
    REASON               VARCHAR(255),
    DEPOSIT              VARCHAR(20),
    EXPECTCOMETIME       VARCHAR(25),
    EXPIRETIME           VARCHAR(25),
    EXPECTCHECKOUTTIME   VARCHAR(25),
    CHECKINTIME          VARCHAR(25),
    PEOPLECOUNT          INTEGER         not null,
    CHECKOUTTIME         VARCHAR(25),
    HAVELEFTCOUNT        INTEGER,
    STATE                INTEGER         not null,
    INGUARD              INTEGER,
    OUTGUARD             INTEGER,
    INOPER               INTEGER,
    OUTOPER              INTEGER,
    TEMPCARD             VARCHAR(255),
    docNbr               VARCHAR(255),
    MEMORY               VARCHAR(255),
    CAR                  VARCHAR(255),
    REMAINCOUNT          VARCHAR(255),
    RELMAN               VARCHAR(128),
    CREATETIME           VARCHAR(25),
    l1                   VARCHAR(255),
    l2                   VARCHAR(255),
    l3                   VARCHAR(255),
    l4                   VARCHAR(255),
    l5                   VARCHAR(255),
constraint PK_EV_VISIT_LOG primary key (VISITLOGID)
);

create  index Index_3 on EV_VISIT_LOG
(
   CHECKINTIME          ASC
);

create table GS_CARD
(
    CARDID               COUNTER         not null,
    CARD                 VARCHAR(20)     not null,
    USERID               INTEGER,
    STATE                INTEGER,
    EFFTIME              VARCHAR(25),
    EXPTIME              VARCHAR(25),
    MEMORY               VARCHAR(255),
constraint PK_GS_CARD primary key (CARDID, CARD)
);

create  index Index_1 on GS_CARD
(
   USERID               ASC
);

create table GS_CARD_EVENT_LOG
(
    logId                COUNTER         not null,
    CARDID               TEXT(10),
    card                 VARCHAR(20),
    userId               INTEGER,
    eventtype            INTEGER,
    occurtime            VARCHAR(25),
    endtime              VARCHAR(25),
    MEMORY               VARCHAR(255),
constraint PK_GS_CARD_EVENT_LOG primary key (logId)
);

create  index Index_1 on GS_CARD_EVENT_LOG
(
   card                 ASC
);

create  index Index_2 on GS_CARD_EVENT_LOG
(
   occurtime            ASC
);

create table GS_CARD_READ_LOG
(
    readLogId            COUNTER         not null,
    userId               INTEGER,
    readtime             VARCHAR(25)     not null,
    cardtype             INTEGER,
    state                INTEGER,
    hdinfo               VARCHAR(128)    not null,
    MEMORY               VARCHAR(255),
constraint PK_GS_CARD_READ_LOG primary key (readLogId)
);

create  index Index_1 on GS_CARD_READ_LOG
(
   readtime             ASC
);

create  index Index_2 on GS_CARD_READ_LOG
(
   userId               ASC
);

create table GS_INFO
(
    userId               COUNTER         not null,
    mankind              VARCHAR(25),
    SEX                  VARCHAR(16),
    BIRTHDAY             VARCHAR(25),
    ADDRESS              VARCHAR(255),
    certify              VARCHAR(255),
    efftime              VARCHAR(25),
    exptime              VARCHAR(25),
    addiinfo             VARCHAR(255),
    NAME                 VARCHAR(128)    not null,
    idtype               VARCHAR(128)    not null,
    idno                 VARCHAR(128)    not null,
    headpic              VARCHAR(255),
    PHONE                VARCHAR(128),
    org                  VARCHAR(128),
    MEMORY               VARCHAR(255),
    STATE                INTEGER,
constraint PK_GS_INFO primary key (userId)
);

create  index Index_1 on GS_INFO
(
   idno                 ASC
);

create  index Index_2 on GS_INFO
(
   PHONE                ASC
);

create  index Index_3 on GS_INFO
(
   NAME                 ASC
);

create table MT_CHECK
(
    checkId              COUNTER         not null,
    subId                NUMERIC,
    meetManId            NUMERIC,
    place                VARCHAR(255),
    askForLeaveTime      VARCHAR(25),
    askForLeaveReason    VARCHAR(255),
    msgSent              VARCHAR(255),
    confirmMode          VARCHAR(255),
    confirmTime          VARCHAR(25),
    beginTime            VARCHAR(25),
    endTime              VARCHAR(25),
    memory               VARCHAR(255),
    c1                   VARCHAR(255),
    c2                   VARCHAR(255),
    c3                   VARCHAR(255),
    c4                   VARCHAR(255),
    c5                   VARCHAR(255),
constraint PK_MT_CHECK primary key (checkId)
);

create table MT_MAN
(
    meetManId            COUNTER         not null,
    recType              VARCHAR(8),
    meetId               INTEGER,
    manId                INTEGER         not null,
    state                INTEGER,
    createTime           VARCHAR(25),
    cardId               VARCHAR(20),
    cardNo               VARCHAR(255),
    place                VARCHAR(255),
    memory               VARCHAR(255),
    m1                   VARCHAR(255),
    m2                   VARCHAR(255),
    m3                   VARCHAR(255),
    m5                   VARCHAR(255),
    m4                   VARCHAR(255),
constraint PK_MT_MAN primary key (meetManId)
);

create table MT_MEET
(
    meetId               COUNTER         not null,
    recType              VARCHAR(8),
    name                 VARCHAR(128),
    ownerId              INTEGER,
    ownerName            VARCHAR(128),
    creator              INTEGER,
    createTime           VARCHAR(25),
    phone                VARCHAR(20),
    specialCard          INTEGER,
    beginTime            VARCHAR(25),
    endTime              VARCHAR(25),
    memory               VARCHAR(255),
    m1                   VARCHAR(255),
    m2                   VARCHAR(255),
    m3                   VARCHAR(255),
    m4                   VARCHAR(255),
    m5                   VARCHAR(255),
constraint PK_MT_MEET primary key (meetId)
);

create table MT_ROOM
(
    roomId               COUNTER         not null,
    name                 VARCHAR(128),
    recType              VARCHAR(8),
    enabled              INTEGER,
    address              VARCHAR(255),
    capacity             INTEGER,
    maintainer           VARCHAR(128),
    phone                VARCHAR(20),
    memory               VARCHAR(255),
    r1                   VARCHAR(255),
    r2                   VARCHAR(255),
    r3                   VARCHAR(255),
    r4                   VARCHAR(255),
    r5                   VARCHAR(255),
constraint PK_MT_ROOM primary key (roomId)
);

create table MT_SUB
(
    subId                COUNTER         not null,
    meetId               NUMERIC,
    roomId               NUMERIC,
    roomName             VARCHAR(128),
    sn                   VARCHAR(128),
    beginTime            VARCHAR(25),
    endTime              VARCHAR(25),
    memory               VARCHAR(255),
    createTime           VARCHAR(25),
    s1                   VARCHAR(255),
    s2                   VARCHAR(255),
    s3                   VARCHAR(255),
    s4                   VARCHAR(255),
    s5                   VARCHAR(255),
constraint PK_MT_SUB primary key (subId)
);

create table SYS_MESSAGE
(
    recId                COUNTER         not null,
    reqId                INTEGER,
    rspId                INTEGER,
    done                 INTEGER,
    reqContent           VARCHAR(255),
    reqType              VARCHAR(8),
    needRsp              INTEGER,
    expireTime           VARCHAR(25),
    rspContent           VARCHAR(255),
    rspType              VARCHAR(8),
    createTime           VARCHAR(25),
    reserved             VARCHAR(255),
constraint PK_SYS_MESSAGE primary key (recId)
);

create table SYS_SESSION
(
    recId                COUNTER         not null,
    manId                INTEGER,
    loginName            VARCHAR(128),
    ip                   VARCHAR(20),
    port                 VARCHAR(20),
    serviceType          VARCHAR(8),
    loginTime            VARCHAR(25),
    checkTime            VARCHAR(25),
    state                INTEGER,
    mobile               VARCHAR(20),
    phone                VARCHAR(20),
    reserved             VARCHAR(255),
constraint PK_SYS_SESSION primary key (recId)
);

