CREATE TABLE STORAGE (
        ID CHAR(32) NOT NULL,
        NAME TEXT NOT NULL,
        TYPE TEXT NOT NULL,
        SIZE BIGINT NOT NULL,
        HOSPITAL TEXT NOT NULL,
        DEPARTMENT TEXT NOT NULL,
        OWNER CHAR(32) NOT NULL,
        ACTIVE CHAR(1) NOT NULL,
        URL TEXT NOT NULL,
        FILE_NAME TEXT NOT NULL,
        CREATE_TIME CHAR(14) NOT NULL);
ALTER TABLE STORAGE ADD PRIMARY KEY (ID);
COMMENT ON TABLE STORAGE IS '医疗影像表';
COMMENT ON COLUMN STORAGE.ID IS '文件ID';
COMMENT ON COLUMN STORAGE.NAME IS '文件名称';
COMMENT ON COLUMN STORAGE.TYPE IS '文件类型';
COMMENT ON COLUMN STORAGE.SIZE IS '文件大小';
COMMENT ON COLUMN STORAGE.HOSPITAL IS '所属医院';
COMMENT ON COLUMN STORAGE.DEPARTMENT IS '文件科室';
COMMENT ON COLUMN STORAGE.OWNER IS '上传人ID';
COMMENT ON COLUMN STORAGE.ACTIVE IS '是否可用';
COMMENT ON COLUMN STORAGE.URL IS '文件路径';
COMMENT ON COLUMN STORAGE.FILE_NAME IS '文件名';
CREATE TABLE LUSER (
        ID CHAR(32) NOT NULL,
        ACCOUNT TEXT NOT NULL,
        PASSWD TEXT NOT NULL,
        NAME TEXT NOT NULL,
        HOSPITAL TEXT NOT NULL,
        DEPARTMENT TEXT NOT NULL,
        ACTIVE CHAR(1) NOT NULL,
        CREATE_TIME CHAR(14) NOT NULL);
ALTER TABLE LUSER ADD PRIMARY KEY (ID);
ALTER TABLE LUSER ADD UNIQUE (ACCOUNT);
COMMENT ON TABLE LUSER IS '用户表';
COMMENT ON COLUMN LUSER.ID IS '用户ID';
COMMENT ON COLUMN LUSER.ACCOUNT IS '用户帐号';
COMMENT ON COLUMN LUSER.PASSWD IS '密码（MD5）';
COMMENT ON COLUMN LUSER.NAME IS '用户姓名';
COMMENT ON COLUMN LUSER.HOSPITAL IS '所属医院';
COMMENT ON COLUMN LUSER.DEPARTMENT IS '所属科室';
COMMENT ON COLUMN LUSER.ACTIVE IS '是否可用';
