-- 达梦数据库（DM）兼容 onlineEducationDM01.sql 脚本
-- 由 MySQL 版本转换

CREATE TABLE commonfile (
  COMMON_FILE_ID VARCHAR(20) NOT NULL,
  USER_FILE_ID BIGINT,
  CONSTRAINT pk_commonfile PRIMARY KEY (COMMON_FILE_ID)
);

COMMENT ON TABLE commonfile IS 'commonfile';
COMMENT ON COLUMN commonfile.USER_FILE_ID IS '用户文件id';

INSERT INTO commonfile (COMMON_FILE_ID, USER_FILE_ID) VALUES ('1932318013386895360', NULL);
INSERT INTO commonfile (COMMON_FILE_ID, USER_FILE_ID) VALUES ('1932321298080481280', NULL);

CREATE TABLE file (
  FILE_ID VARCHAR(20) NOT NULL,
  CREATE_TIME VARCHAR(25),
  CREATE_USER_ID VARCHAR(20),
  FILE_SIZE BIGINT,
  FILE_STATUS INT,
  FILE_URL VARCHAR(500),
  IDENTIFIER VARCHAR(32),
  MODIFY_TIME VARCHAR(25),
  MODIFY_USER_ID VARCHAR(20),
  STORAGE_TYPE INT,
  FILE_RESOURCE INT,
  CONSTRAINT pk_file PRIMARY KEY (FILE_ID)
);

COMMENT ON TABLE file IS 'file';
COMMENT ON COLUMN file.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN file.CREATE_USER_ID IS '创建用户id';
COMMENT ON COLUMN file.FILE_SIZE IS '文件大小';
COMMENT ON COLUMN file.FILE_STATUS IS '文件状态(0-失效，1-生效)';
COMMENT ON COLUMN file.FILE_URL IS '文件url';
COMMENT ON COLUMN file.IDENTIFIER IS 'md5唯一标识';
COMMENT ON COLUMN file.MODIFY_TIME IS '修改时间';
COMMENT ON COLUMN file.MODIFY_USER_ID IS '修改用户id';
COMMENT ON COLUMN file.STORAGE_TYPE IS '存储类型';
COMMENT ON COLUMN file.FILE_RESOURCE IS '文件来源 0:用户上传 1:群组上传';

CREATE TABLE fileclassification (
  FILE_CLASSIFICATION_ID BIGINT NOT NULL IDENTITY,
  FILE_EXTEND_NAME VARCHAR(25),
  FILE_TYPE_ID BIGINT,
  CONSTRAINT pk_fileclassification PRIMARY KEY (FILE_CLASSIFICATION_ID)
);

COMMENT ON TABLE fileclassification IS 'fileclassification';
COMMENT ON COLUMN fileclassification.FILE_EXTEND_NAME IS '文件扩展名';
COMMENT ON COLUMN fileclassification.FILE_TYPE_ID IS '文件类型id';

CREATE TABLE fileextend (
  FILE_EXTEND_NAME VARCHAR(25) NOT NULL,
  FILE_EXTEND_DESC VARCHAR(25),
  FILE_EXTEND_IMG_URL VARCHAR(100),
  CONSTRAINT pk_fileextend PRIMARY KEY (FILE_EXTEND_NAME)
);

COMMENT ON TABLE fileextend IS 'fileextend';
COMMENT ON COLUMN fileextend.FILE_EXTEND_DESC IS '文件扩展名描述';
COMMENT ON COLUMN fileextend.FILE_EXTEND_IMG_URL IS '文件扩展名预览图';

CREATE TABLE filepermission (
  FILE_PERMISSION_ID BIGINT NOT NULL IDENTITY,
  COMMON_FILE_ID VARCHAR(20),
  FILE_PERMISSION_CODE INT,
  USER_ID BIGINT,
  CONSTRAINT pk_filepermission PRIMARY KEY (FILE_PERMISSION_ID)
);

COMMENT ON TABLE filepermission IS 'filepermission';
COMMENT ON COLUMN filepermission.COMMON_FILE_ID IS '共享文件id';
COMMENT ON COLUMN filepermission.FILE_PERMISSION_CODE IS '用户对文件的权限码';
COMMENT ON COLUMN filepermission.USER_ID IS '用户id';

CREATE TABLE filetype (
  FILE_TYPE_ID INT NOT NULL,
  FILE_TYPE_NAME VARCHAR(50),
  ORDER_NUM INT,
  CONSTRAINT pk_filetype PRIMARY KEY (FILE_TYPE_ID)
);

COMMENT ON TABLE filetype IS 'filetype';
COMMENT ON COLUMN filetype.FILE_TYPE_NAME IS '文件类型名';
COMMENT ON COLUMN filetype.ORDER_NUM IS '次序';

CREATE TABLE hibernate_sequence (
  NEXT_VAL BIGINT
);

INSERT INTO hibernate_sequence (NEXT_VAL) VALUES (1);

CREATE TABLE image (
  IMAGE_ID BIGINT NOT NULL IDENTITY,
  FILE_ID BIGINT,
  IMAGE_HEIGHT INT,
  IMAGE_WIDTH INT,
  CONSTRAINT pk_image PRIMARY KEY (IMAGE_ID)
);

COMMENT ON TABLE image IS 'image';
COMMENT ON COLUMN image.FILE_ID IS '文件id';
COMMENT ON COLUMN image.IMAGE_HEIGHT IS '图像的高';
COMMENT ON COLUMN image.IMAGE_WIDTH IS '图像的宽';


CREATE TABLE music (
  MUSIC_ID BIGINT NOT NULL IDENTITY,
  ALBUM VARCHAR(255),
  ALBUM_ARTIST VARCHAR(255),
  ALBUM_IMAGE BLOB,
  ARTIST VARCHAR(255),
  "COMMENT" VARCHAR(255),
  COMPOSER VARCHAR(255),
  COPYRIGHT VARCHAR(255),
  ENCODER VARCHAR(255),
  FILE_ID BIGINT,
  GENRE VARCHAR(255),
  LYRICS CLOB,
  ORIGINAL_ARTIST VARCHAR(255),
  PUBLICER VARCHAR(255),
  TITLE VARCHAR(255),
  TRACK VARCHAR(255),
  TRACK_LENGTH FLOAT,
  URL VARCHAR(255),
  YEAR VARCHAR(255),
  CONSTRAINT pk_music PRIMARY KEY (MUSIC_ID)
);

COMMENT ON TABLE music IS 'music';
COMMENT ON COLUMN music.ALBUM IS '专辑';
COMMENT ON COLUMN music.ALBUM_ARTIST IS '专辑艺术家';
COMMENT ON COLUMN music.ALBUM_IMAGE IS '专辑封面';
COMMENT ON COLUMN music.ARTIST IS '艺术家';
COMMENT ON COLUMN music."COMMENT" IS '注释';
COMMENT ON COLUMN music.COMPOSER IS '作曲家';
COMMENT ON COLUMN music.COPYRIGHT IS '版权';
COMMENT ON COLUMN music.ENCODER IS '编码器';
COMMENT ON COLUMN music.FILE_ID IS '文件id';
COMMENT ON COLUMN music.GENRE IS '流派';
COMMENT ON COLUMN music.LYRICS IS '歌词';
COMMENT ON COLUMN music.ORIGINAL_ARTIST IS '原始艺术家';
COMMENT ON COLUMN music.PUBLICER IS '发布者';
COMMENT ON COLUMN music.TITLE IS '标题';
COMMENT ON COLUMN music.TRACK IS '轨道';
COMMENT ON COLUMN music.TRACK_LENGTH IS '轨道长度';
COMMENT ON COLUMN music.URL IS 'URL';   

CREATE TABLE notice (
  NOTICE_ID BIGINT NOT NULL IDENTITY,
  CONTENT CLOB,
  CREATE_TIME VARCHAR(25),
  CREATE_USER_ID BIGINT,
  IS_LONG_VALID_DATA INT,
  MARKDOWN_CONTENT CLOB,
  MODIFY_TIME VARCHAR(25),
  MODIFY_USER_ID BIGINT,
  PLATFORM INT,
  TITLE VARCHAR(100) NOT NULL,
  VALID_DATE_TIME VARCHAR(25),
  CONSTRAINT pk_notice PRIMARY KEY (NOTICE_ID)
);

COMMENT ON TABLE notice IS 'notice';
COMMENT ON COLUMN notice.CONTENT IS 'html内容';
COMMENT ON COLUMN notice.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN notice.CREATE_USER_ID IS '创建用户id';
COMMENT ON COLUMN notice.IS_LONG_VALID_DATA IS '是否长期有效(0-否,1-是)';
COMMENT ON COLUMN notice.MARKDOWN_CONTENT IS 'markdown原文';
COMMENT ON COLUMN notice.MODIFY_TIME IS '修改时间';
COMMENT ON COLUMN notice.MODIFY_USER_ID IS '修改用户id';
COMMENT ON COLUMN notice.PLATFORM IS '平台(1-社区,2-管理端,3-网盘,4-股票)';
COMMENT ON COLUMN notice.TITLE IS '标题';
COMMENT ON COLUMN notice.VALID_DATE_TIME IS '有效时间';

CREATE TABLE operationlog (
  OPERATION_LOG_ID BIGINT NOT NULL IDENTITY,
  DETAIL VARCHAR(100),
  LOG_LEVEL INT,
  OPERATION VARCHAR(50),
  OPERATION_OBJ VARCHAR(255),
  PLATFORM INT,
  REQUEST_METHOD VARCHAR(255),
  REQUEST_URI VARCHAR(255),
  RESULT VARCHAR(20),
  SOURCE VARCHAR(255),
  TERMINAL VARCHAR(255),
  TIME VARCHAR(25),
  USER_ID VARCHAR(20),
  CONSTRAINT pk_operationlog PRIMARY KEY (OPERATION_LOG_ID)
);

COMMENT ON TABLE operationlog IS 'operationlog';
COMMENT ON COLUMN operationlog.DETAIL IS '操作详情';
COMMENT ON COLUMN operationlog.OPERATION IS '操作';
COMMENT ON COLUMN operationlog.PLATFORM IS '平台(1-社区,2-管理端,3-网盘,4-股票)';
COMMENT ON COLUMN operationlog.RESULT IS '操作结果';
COMMENT ON COLUMN operationlog.TERMINAL IS '终端ip地址';
COMMENT ON COLUMN operationlog.TIME IS '操作时间';
COMMENT ON COLUMN operationlog.USER_ID IS '用户id';

CREATE TABLE permission (
  PERMISSION_ID BIGINT NOT NULL IDENTITY,
  CREATE_TIME VARCHAR(30),
  CREATE_USER_ID BIGINT,
  MODIFY_TIME VARCHAR(30),
  MODIFY_USER_ID BIGINT,
  ORDER_NUM INT,
  PARENT_ID BIGINT,
  PERMISSION_CODE VARCHAR(30),
  PERMISSION_NAME VARCHAR(30),
  RESOURCE_TYPE INT,
  CONSTRAINT pk_permission PRIMARY KEY (PERMISSION_ID)
);

COMMENT ON TABLE permission IS 'permission';
COMMENT ON COLUMN permission.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN permission.CREATE_USER_ID IS '创建用户id';
COMMENT ON COLUMN permission.MODIFY_TIME IS '修改时间';
COMMENT ON COLUMN permission.MODIFY_USER_ID IS '修改用户id';
COMMENT ON COLUMN permission.ORDER_NUM IS '次序';
COMMENT ON COLUMN permission.PARENT_ID IS '父编号';
COMMENT ON COLUMN permission.PERMISSION_CODE IS '权限标识码';
COMMENT ON COLUMN permission.PERMISSION_NAME IS '权限名称';
COMMENT ON COLUMN permission.RESOURCE_TYPE IS '资源类型';

CREATE TABLE picturefile (
  PICTURE_FILE_ID BIGINT NOT NULL IDENTITY,
  CREATE_TIME VARCHAR(25),
  CREATE_USER_ID BIGINT,
  EXTEND_NAME VARCHAR(100),
  FILE_NAME VARCHAR(100),
  FILE_SIZE BIGINT,
  FILE_URL VARCHAR(500),
  MODIFY_TIME VARCHAR(25),
  MODIFY_USER_ID BIGINT,
  STORAGE_TYPE INT,
  USER_ID BIGINT,
  CONSTRAINT pk_picturefile PRIMARY KEY (PICTURE_FILE_ID)
);

COMMENT ON TABLE picturefile IS 'picturefile';
COMMENT ON COLUMN picturefile.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN picturefile.CREATE_USER_ID IS '创建用户id';
COMMENT ON COLUMN picturefile.EXTEND_NAME IS '扩展名';
COMMENT ON COLUMN picturefile.FILE_NAME IS '文件名';
COMMENT ON COLUMN picturefile.FILE_SIZE IS '文件大小';
COMMENT ON COLUMN picturefile.FILE_URL IS '文件url';
COMMENT ON COLUMN picturefile.MODIFY_TIME IS '修改时间';
COMMENT ON COLUMN picturefile.MODIFY_USER_ID IS '修改用户id';
COMMENT ON COLUMN picturefile.STORAGE_TYPE IS '存储类型';
COMMENT ON COLUMN picturefile.USER_ID IS '用户id';

CREATE TABLE recoveryfile (
  RECOVERY_FILE_ID BIGINT NOT NULL IDENTITY,
  DELETE_BATCH_NUM VARCHAR(50),
  DELETE_TIME VARCHAR(25),
  USER_FILE_ID BIGINT,
  CONSTRAINT pk_recoveryfile PRIMARY KEY (RECOVERY_FILE_ID)
);

COMMENT ON TABLE recoveryfile IS 'recoveryfile';
COMMENT ON COLUMN recoveryfile.DELETE_BATCH_NUM IS '删除批次号';
COMMENT ON COLUMN recoveryfile.DELETE_TIME IS '删除时间';
COMMENT ON COLUMN recoveryfile.USER_FILE_ID IS '用户文件id';

CREATE TABLE role (
  ROLE_ID BIGINT NOT NULL IDENTITY,
  AVAILABLE INT,
  CREATE_TIME VARCHAR(30),
  CREATE_USER_ID BIGINT,
  DESCRIPTION VARCHAR(100),
  MODIFY_TIME VARCHAR(30),
  MODIFY_USER_ID BIGINT,
  ROLE_NAME VARCHAR(20),
  CONSTRAINT pk_role PRIMARY KEY (ROLE_ID)
);

COMMENT ON TABLE role IS 'role';
COMMENT ON COLUMN role.AVAILABLE IS '是否可用(0-不可用,1-可用)';
COMMENT ON COLUMN role.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN role.CREATE_USER_ID IS '创建用户id';
COMMENT ON COLUMN role.DESCRIPTION IS '角色描述';
COMMENT ON COLUMN role.MODIFY_TIME IS '修改时间';
COMMENT ON COLUMN role.MODIFY_USER_ID IS '修改用户id';
COMMENT ON COLUMN role.ROLE_NAME IS '角色名';


CREATE TABLE role_permission (
  ID BIGINT NOT NULL IDENTITY,
  PERMISSION_ID BIGINT,
  ROLE_ID BIGINT,
  CONSTRAINT pk_role_permission PRIMARY KEY (ID)
);

COMMENT ON TABLE role_permission IS 'role_permission';
COMMENT ON COLUMN role_permission.PERMISSION_ID IS '权限id';
COMMENT ON COLUMN role_permission.ROLE_ID IS '角色id';

CREATE TABLE share (
  SHARE_ID VARCHAR(255) NOT NULL,
  END_TIME VARCHAR(30),
  EXTRACTION_CODE VARCHAR(10),
  SHARE_BATCH_NUM VARCHAR(40),
  SHARE_STATUS INT,
  SHARE_TIME VARCHAR(30),
  SHARE_TYPE INT,
  USER_ID VARCHAR(20),
  CONSTRAINT pk_share PRIMARY KEY (SHARE_ID)
);

COMMENT ON TABLE share IS 'share';
COMMENT ON COLUMN share.END_TIME IS '失效时间';
COMMENT ON COLUMN share.EXTRACTION_CODE IS '提取码';
COMMENT ON COLUMN share.SHARE_BATCH_NUM IS '分享批次号';
COMMENT ON COLUMN share.SHARE_STATUS IS '分享状态(0正常,1已失效,2已撤销)';
COMMENT ON COLUMN share.SHARE_TIME IS '分享时间';
COMMENT ON COLUMN share.SHARE_TYPE IS '分享类型(0公共,1私密,2好友)';
COMMENT ON COLUMN share.USER_ID IS '用户id';

CREATE TABLE sharefile (
  SHARE_FILE_ID VARCHAR(255) NOT NULL,
  SHARE_BATCH_NUM VARCHAR(50),
  SHARE_FILE_PATH VARCHAR(100),
  USER_FILE_ID VARCHAR(20),
  CONSTRAINT pk_sharefile PRIMARY KEY (SHARE_FILE_ID)
);

COMMENT ON TABLE sharefile IS 'sharefile';
COMMENT ON COLUMN sharefile.SHARE_BATCH_NUM IS '分享批次号';
COMMENT ON COLUMN sharefile.SHARE_FILE_PATH IS '分享文件路径';
COMMENT ON COLUMN sharefile.USER_FILE_ID IS '用户文件id';

CREATE TABLE storage (
  STORAGE_ID BIGINT NOT NULL IDENTITY,
  MODIFY_TIME VARCHAR(25),
  MODIFY_USER_ID BIGINT,
  STORAGE_SIZE BIGINT,
  TOTAL_STORAGE_SIZE BIGINT,
  USER_ID VARCHAR(50),
  CONSTRAINT pk_storage PRIMARY KEY (STORAGE_ID)
);

COMMENT ON TABLE storage IS 'storage';
COMMENT ON COLUMN storage.MODIFY_TIME IS '修改时间';
COMMENT ON COLUMN storage.MODIFY_USER_ID IS '修改用户id';
COMMENT ON COLUMN storage.STORAGE_SIZE IS '占用存储大小';
COMMENT ON COLUMN storage.TOTAL_STORAGE_SIZE IS '总存储大小';
COMMENT ON COLUMN storage.USER_ID IS '用户id';

CREATE TABLE sysparam (
  SYS_PARAM_ID BIGINT NOT NULL IDENTITY,
  GROUP_NAME VARCHAR(50),
  SYS_PARAM_DESC VARCHAR(50),
  SYS_PARAM_KEY VARCHAR(50),
  SYS_PARAM_VALUE VARCHAR(50),
  CONSTRAINT pk_sysparam PRIMARY KEY (SYS_PARAM_ID)
);

COMMENT ON TABLE sysparam IS 'sysparam';
COMMENT ON COLUMN sysparam.GROUP_NAME IS 'GROUP_NAME';
COMMENT ON COLUMN sysparam.SYS_PARAM_DESC IS 'SYS_PARAM_DESC';
COMMENT ON COLUMN sysparam.SYS_PARAM_KEY IS 'SYS_PARAM_KEY';
COMMENT ON COLUMN sysparam.SYS_PARAM_VALUE IS 'SYS_PARAM_VALUE';

CREATE TABLE uploadtask (
  UPLOAD_TASK_ID BIGINT NOT NULL IDENTITY,
  EXTEND_NAME VARCHAR(100),
  FILE_NAME VARCHAR(100),
  FILE_PATH VARCHAR(500),
  IDENTIFIER VARCHAR(32),
  UPLOAD_STATUS INT,
  UPLOAD_TIME VARCHAR(25),
  USER_ID BIGINT,
  CONSTRAINT pk_uploadtask PRIMARY KEY (UPLOAD_TASK_ID)
);

COMMENT ON TABLE uploadtask IS 'uploadtask';
COMMENT ON COLUMN uploadtask.EXTEND_NAME IS '扩展名';
COMMENT ON COLUMN uploadtask.FILE_NAME IS '文件名称';
COMMENT ON COLUMN uploadtask.FILE_PATH IS '文件路径';
COMMENT ON COLUMN uploadtask.IDENTIFIER IS 'md5唯一标识';
COMMENT ON COLUMN uploadtask.UPLOAD_STATUS IS '上传状态(1-成功,0-失败或未完成)';
COMMENT ON COLUMN uploadtask.UPLOAD_TIME IS '上传时间';
COMMENT ON COLUMN uploadtask.USER_ID IS '用户id';

CREATE TABLE uploadtaskdetail (
  UPLOAD_TASK_DETAIL_ID BIGINT NOT NULL IDENTITY,
  CHUNK_NUMBER INT,
  CHUNK_SIZE BIGINT,
  FILE_PATH VARCHAR(500),
  FILENAME VARCHAR(100),
  IDENTIFIER VARCHAR(100),
  RELATIVE_PATH VARCHAR(500),
  TOTAL_CHUNKS INT,
  TOTAL_SIZE BIGINT,
  CONSTRAINT pk_uploadtaskdetail PRIMARY KEY (UPLOAD_TASK_DETAIL_ID)
);

COMMENT ON TABLE uploadtaskdetail IS 'uploadtaskdetail';
COMMENT ON COLUMN uploadtaskdetail.CHUNK_NUMBER IS '当前分片数';
COMMENT ON COLUMN uploadtaskdetail.CHUNK_SIZE IS '当前分片大小';
COMMENT ON COLUMN uploadtaskdetail.FILE_PATH IS '文件路径';
COMMENT ON COLUMN uploadtaskdetail.FILENAME IS '文件名称';
COMMENT ON COLUMN uploadtaskdetail.IDENTIFIER IS '文件md5唯一标识';
COMMENT ON COLUMN uploadtaskdetail.RELATIVE_PATH IS '文件相对路径';
COMMENT ON COLUMN uploadtaskdetail.TOTAL_CHUNKS IS '文件总分片数';
COMMENT ON COLUMN uploadtaskdetail.TOTAL_SIZE IS '文件总大小';

CREATE TABLE user_role (
  USER_ROLE_ID BIGINT NOT NULL IDENTITY,
  ROLE_ID BIGINT,
  USER_ID VARCHAR(255),
  CONSTRAINT pk_user_role PRIMARY KEY (USER_ROLE_ID)
);

COMMENT ON TABLE user_role IS 'user_role';
COMMENT ON COLUMN user_role.ROLE_ID IS 'ROLE_ID';
COMMENT ON COLUMN user_role.USER_ID IS 'USER_ID';

CREATE TABLE userfile (
  USER_FILE_ID VARCHAR(20) NOT NULL,
  CREATE_TIME VARCHAR(30),
  CREATE_USER_ID VARCHAR(20),
  DELETE_BATCH_NUM VARCHAR(50),
  DELETE_FLAG INT,
  DELETE_TIME VARCHAR(25),
  EXTEND_NAME VARCHAR(100) DEFAULT '',
  FILE_ID VARCHAR(20),
  FILE_NAME VARCHAR(100),
  FILE_PATH VARCHAR(500),
  IS_DIR INT,
  MODIFY_TIME VARCHAR(30),
  MODIFY_USER_ID VARCHAR(20),
  UPLOAD_TIME VARCHAR(25),
  USER_ID BIGINT,
  CONSTRAINT pk_userfile PRIMARY KEY (USER_FILE_ID)
);

COMMENT ON TABLE userfile IS 'userfile';
COMMENT ON COLUMN userfile.CREATE_TIME IS '创建时间';
COMMENT ON COLUMN userfile.CREATE_USER_ID IS '创建用户id';
COMMENT ON COLUMN userfile.DELETE_BATCH_NUM IS '删除批次号';
COMMENT ON COLUMN userfile.DELETE_FLAG IS '删除标识(0-未删除，1-已删除)';
COMMENT ON COLUMN userfile.DELETE_TIME IS '删除时间';
COMMENT ON COLUMN userfile.EXTEND_NAME IS '扩展名';
COMMENT ON COLUMN userfile.FILE_ID IS '文件id';
COMMENT ON COLUMN userfile.FILE_NAME IS '文件名';
COMMENT ON COLUMN userfile.FILE_PATH IS '文件路径';
COMMENT ON COLUMN userfile.IS_DIR IS '是否是目录(0-否,1-是)';
COMMENT ON COLUMN userfile.MODIFY_TIME IS '修改时间';
COMMENT ON COLUMN userfile.MODIFY_USER_ID IS '修改用户id';
COMMENT ON COLUMN userfile.UPLOAD_TIME IS '修改时间';
COMMENT ON COLUMN userfile.USER_ID IS '用户id';

CREATE UNIQUE INDEX fileindex ON userfile(USER_ID, FILE_PATH, FILE_NAME, EXTEND_NAME, DELETE_FLAG, IS_DIR);

CREATE TABLE userlogininfo (
  USER_LOGIN_ID BIGINT NOT NULL IDENTITY,
  USER_ID VARCHAR(20),
  USER_LOGIN_DATE VARCHAR(30),
  CONSTRAINT pk_userlogininfo PRIMARY KEY (USER_LOGIN_ID)
);

COMMENT ON TABLE userlogininfo IS 'userlogininfo';
COMMENT ON COLUMN userlogininfo.USER_ID IS '用户id';
COMMENT ON COLUMN userlogininfo.USER_LOGIN_DATE IS '用户登录日期'; 