file
This commit is contained in:
101
db/file-postgres.sql
Normal file
101
db/file-postgres.sql
Normal file
@@ -0,0 +1,101 @@
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for x_file_category
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS x_file_category;
|
||||
CREATE TABLE x_file_category (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
file_category VARCHAR(32) DEFAULT NULL,
|
||||
file_suffix VARCHAR(32) DEFAULT NULL,
|
||||
deleted BOOLEAN DEFAULT FALSE,
|
||||
create_by BIGINT DEFAULT NULL,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
update_by BIGINT DEFAULT NULL,
|
||||
update_time TIMESTAMP DEFAULT NULL,
|
||||
proxy_by BIGINT DEFAULT NULL
|
||||
);
|
||||
COMMENT ON TABLE x_file_category IS '文件种类';
|
||||
COMMENT ON COLUMN x_file_category.id IS '主键ID';
|
||||
COMMENT ON COLUMN x_file_category.file_category IS '文件种类';
|
||||
COMMENT ON COLUMN x_file_category.file_suffix IS '文件后缀';
|
||||
COMMENT ON COLUMN x_file_category.deleted IS '是否删除';
|
||||
COMMENT ON COLUMN x_file_category.create_by IS '创建人';
|
||||
COMMENT ON COLUMN x_file_category.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN x_file_category.update_by IS '修改人';
|
||||
COMMENT ON COLUMN x_file_category.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN x_file_category.proxy_by IS '代理人';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for x_user_space
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS x_user_space;
|
||||
CREATE TABLE x_user_space (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT NULL,
|
||||
total_size BIGINT DEFAULT NULL,
|
||||
used_size BIGINT DEFAULT NULL,
|
||||
deleted BOOLEAN DEFAULT FALSE,
|
||||
create_by BIGINT DEFAULT NULL,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
update_by BIGINT DEFAULT NULL,
|
||||
update_time TIMESTAMP DEFAULT NULL,
|
||||
proxy_by BIGINT DEFAULT NULL
|
||||
);
|
||||
COMMENT ON TABLE x_user_space IS '用户空间';
|
||||
COMMENT ON COLUMN x_user_space.id IS '主键ID';
|
||||
COMMENT ON COLUMN x_user_space.user_id IS '用户id';
|
||||
COMMENT ON COLUMN x_user_space.total_size IS '总容量';
|
||||
COMMENT ON COLUMN x_user_space.used_size IS '已使用容量';
|
||||
COMMENT ON COLUMN x_user_space.deleted IS '是否删除';
|
||||
COMMENT ON COLUMN x_user_space.create_by IS '创建人';
|
||||
COMMENT ON COLUMN x_user_space.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN x_user_space.update_by IS '修改人';
|
||||
COMMENT ON COLUMN x_user_space.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN x_user_space.proxy_by IS '代理人';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for x_user_file
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS x_user_file;
|
||||
CREATE TABLE x_user_file (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
user_id BIGINT DEFAULT NULL,
|
||||
root_type VARCHAR(2) DEFAULT NULL,
|
||||
file_type VARCHAR(32) DEFAULT NULL,
|
||||
file_name VARCHAR(256) DEFAULT NULL,
|
||||
parent_id BIGINT DEFAULT NULL,
|
||||
file_code VARCHAR(32) DEFAULT NULL,
|
||||
file_status VARCHAR(2) DEFAULT NULL,
|
||||
path VARCHAR(255) DEFAULT NULL,
|
||||
end_time TIMESTAMP DEFAULT NULL,
|
||||
access_code VARCHAR(6) DEFAULT NULL,
|
||||
deleted BOOLEAN DEFAULT FALSE,
|
||||
create_by BIGINT DEFAULT NULL,
|
||||
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
update_by BIGINT DEFAULT NULL,
|
||||
update_time TIMESTAMP DEFAULT NULL,
|
||||
proxy_by BIGINT DEFAULT NULL
|
||||
);
|
||||
COMMENT ON TABLE x_user_file IS '用户文件';
|
||||
COMMENT ON COLUMN x_user_file.id IS '主键ID';
|
||||
COMMENT ON COLUMN x_user_file.user_id IS '用户id';
|
||||
COMMENT ON COLUMN x_user_file.root_type IS '根类型:1普通/2内穿外/3外传内/4我的分享';
|
||||
COMMENT ON COLUMN x_user_file.file_type IS '文件大类:1文件/2文件夹';
|
||||
COMMENT ON COLUMN x_user_file.file_name IS '文件名';
|
||||
COMMENT ON COLUMN x_user_file.parent_id IS '父id';
|
||||
COMMENT ON COLUMN x_user_file.file_code IS '文件编码';
|
||||
COMMENT ON COLUMN x_user_file.file_status IS '文件状态:1正常2失效11解析中12待审核13传输中';
|
||||
COMMENT ON COLUMN x_user_file.path IS '路径';
|
||||
COMMENT ON COLUMN x_user_file.end_time IS '有效期';
|
||||
COMMENT ON COLUMN x_user_file.access_code IS '访问码';
|
||||
COMMENT ON COLUMN x_user_file.deleted IS '是否删除';
|
||||
COMMENT ON COLUMN x_user_file.create_by IS '创建人';
|
||||
COMMENT ON COLUMN x_user_file.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN x_user_file.update_by IS '修改人';
|
||||
COMMENT ON COLUMN x_user_file.update_time IS '修改时间';
|
||||
COMMENT ON COLUMN x_user_file.proxy_by IS '代理人';
|
||||
|
||||
|
||||
|
||||
50
db/file.sql
Normal file
50
db/file.sql
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
CREATE TABLE `x_file_category` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`file_category` varchar(32) DEFAULT NULL COMMENT '文件种类',
|
||||
`file_suffix` varchar(32) DEFAULT NULL COMMENT '文件后缀',
|
||||
|
||||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文件种类';
|
||||
|
||||
CREATE TABLE `x_user_space` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||||
`total_size` bigint DEFAULT NULL COMMENT '总容量',
|
||||
`used_size` bigint DEFAULT NULL COMMENT '已使用容量',
|
||||
|
||||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户空间';
|
||||
|
||||
CREATE TABLE `x_user_file` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
|
||||
`root_type` varchar(2) DEFAULT NULL COMMENT '根类型:1普通/2内穿外/3外传内/4我的分享',
|
||||
`file_type` varchar(32) DEFAULT NULL COMMENT '文件大类:1文件/2文件夹',
|
||||
`file_name` varchar(256) DEFAULT NULL COMMENT '文件名',
|
||||
`parent_id` bigint(20) DEFAULT NULL COMMENT '父id',
|
||||
`file_code` varchar(32) DEFAULT NULL COMMENT '文件编码',
|
||||
`file_status` varchar(2) DEFAULT NULL COMMENT '文件状态:1正常2失效11解析中12待审核13传输中',
|
||||
`path` varchar(255) DEFAULT NULL COMMENT '路径',
|
||||
`end_time` datetime DEFAULT NULL COMMENT '有效期',
|
||||
`access_code` varchar(6) DEFAULT NULL COMMENT '访问码',
|
||||
`deleted` bit(1) DEFAULT b'0' COMMENT '是否删除',
|
||||
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',
|
||||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||
`proxy_by` bigint(20) DEFAULT NULL COMMENT '代理人',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户文件';
|
||||
20
db/init-data.sql
Normal file
20
db/init-data.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
-- 系统uc_platform
|
||||
INSERT INTO uc_platform
|
||||
(platform_code, name, full_name, short_name, business, deleted, create_time)
|
||||
VALUES(1, '文档系统', 's-file', 'file', 1, 0, now());
|
||||
|
||||
-- 平台机构/平台机构管理员
|
||||
INSERT INTO xs_org
|
||||
(org_name, org_code, type, address_code, address_name, description, quality, enable, activated, parent_id, credit_code, trade, deleted, create_by, create_time, update_by, update_time, proxy_by, activation_code, phone, query_children, org_logo, registered_address, company_size, business_license, recruit_position_type)
|
||||
VALUES('senmesh', 'O001', '1', '440232', NULL, NULL, 0, 1, 1, NULL, '', NULL, 0, 0, now(), 1, now(), null, NULL, null, NULL, null, '1234', '6', null, '1');
|
||||
|
||||
INSERT INTO uc_user
|
||||
(username, password, type, supeiror, security_code, nickname, avatar, phone, phone_binding, real_name, card_no, authenticated, status, email, address, education, init_user_id, enabled, account_non_expired, account_non_locked, credentials_non_expired, deleted, create_by, create_time, update_by, update_time, proxy_by, gender, birthday)
|
||||
VALUES('admin', '$2a$10$0N3iaxx2sYv0hXvYzS4.6.yriL.DfjRTjED7Y4vkqxzbxi2dNpBou', 1, 1, '$2a$10$992AErI/g5nnfGnraSh7NuoeZVOXYcPuPQ3hqi5FjjIlU0Dwfk0/a', '平台管理员', '20d78fb6abe9478cadc2e1cb5bf93a35', '13611806907', 1, '平台管理员', NULL, 0, 2, null, NULL, NULL, NULL, 1, 1, 1, 1, 0, 0, now(), 1, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO uc_org_user
|
||||
(user_id, org_id, administrator, deleted, create_by, create_time, update_by, update_time, proxy_by)
|
||||
VALUES(1, 1, 1, 0, 0, now(), NULL, NULL, NULL);
|
||||
-- 平台uc_org_relation
|
||||
INSERT INTO uc_org_relation
|
||||
(org_id, org_type, parent_id, path, platform_code, platform_name, deleted, create_by, create_time, update_by, update_time, proxy_by)
|
||||
VALUES(1, 1, 0, '1', 1, NULL, 0, NULL, NULL, NULL, NULL, NULL);
|
||||
Reference in New Issue
Block a user