数据库设计完成

This commit is contained in:
JIAL 2023-12-05 12:54:42 +08:00
parent c8b399c50d
commit 53981096ec
3 changed files with 260 additions and 6 deletions

247
FWSystem.sql Normal file
View File

@ -0,0 +1,247 @@
/*
Navicat Premium Data Transfer
Source Server : Mysql57
Source Server Type : MySQL
Source Server Version : 50729
Source Host : localhost:3306
Source Schema : fwsystem
Target Server Type : MySQL
Target Server Version : 50729
File Encoding : 65001
Date: 05/12/2023 12:53:06
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for agent
-- ----------------------------
DROP TABLE IF EXISTS `agent`;
CREATE TABLE `agent` (
`id` bigint(20) NOT NULL,
`type` int(11) NOT NULL COMMENT '代理人类型1-律师2-法律工作者3-单位推荐4-其他',
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '姓名',
`license_type` int(11) NULL DEFAULT NULL COMMENT '证件类型1-居民身份证',
`license_num` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '证件号码',
`phone_num` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '电话号码',
`create_time` datetime NULL DEFAULT NULL,
`update_time` datetime NULL DEFAULT NULL,
`create_user` bigint(20) NULL DEFAULT NULL,
`update_user` bigint(20) NULL DEFAULT NULL,
`reserved_field1` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段1',
`reserved_field2` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段2',
`reserved_field3` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段3',
`reserved_field4` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段4',
`reserved_field5` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段5',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of agent
-- ----------------------------
-- ----------------------------
-- Table structure for annex
-- ----------------------------
DROP TABLE IF EXISTS `annex`;
CREATE TABLE `annex` (
`id` bigint(20) NOT NULL COMMENT 'id',
`case_id` bigint(20) NOT NULL COMMENT '案件id',
`indictment` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '附件起诉状',
`party_prove` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '当事人身份证明',
`proxy_prove` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '托代理人委托手续和身份材料',
`evidence` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '证据材料',
`deliver_confirm` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '送达地址确认书',
`other_materials` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '其他材料',
`create_time` datetime NULL DEFAULT NULL,
`update_time` datetime NULL DEFAULT NULL,
`create_user` bigint(20) NULL DEFAULT NULL,
`update_user` bigint(20) NULL DEFAULT NULL,
`reserved_field1` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段1',
`reserved_field2` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段2',
`reserved_field3` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段3',
`reserved_field4` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段4',
`reserved_field5` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段5',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of annex
-- ----------------------------
-- ----------------------------
-- Table structure for defendant
-- ----------------------------
DROP TABLE IF EXISTS `defendant`;
CREATE TABLE `defendant` (
`id` bigint(20) NOT NULL COMMENT 'id',
`type` int(11) NOT NULL COMMENT '当事人类型1-法人',
`unit_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '单位名称',
`unit_location` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '单位所在地',
`create_time` datetime NULL DEFAULT NULL,
`update_time` datetime NULL DEFAULT NULL,
`create_user` bigint(20) NULL DEFAULT NULL,
`update_user` bigint(20) NULL DEFAULT NULL,
`reserved_field1` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段1',
`reserved_field2` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段2',
`reserved_field3` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段3',
`reserved_field4` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段4',
`reserved_field5` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段5',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of defendant
-- ----------------------------
-- ----------------------------
-- Table structure for employee
-- ----------------------------
DROP TABLE IF EXISTS `employee`;
CREATE TABLE `employee` (
`id` bigint(20) NOT NULL COMMENT '主键',
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '姓名',
`username` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '用户名',
`password` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '密码',
`phone` varchar(11) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '手机号',
`admin` varchar(2) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '是否为管理员1=true0 = false',
`status` int(11) NOT NULL DEFAULT 1 COMMENT '状态 0:禁用1:正常',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间',
`create_user` bigint(20) NOT NULL COMMENT '创建人',
`update_user` bigint(20) NOT NULL COMMENT '修改人',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `idx_username`(`username`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '员工信息' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of employee
-- ----------------------------
INSERT INTO `employee` VALUES (1, '管理员', 'admin', 'e10adc3949ba59abbe56e057f20f883e', '13812312312', '1', 1, '2021-05-06 17:20:07', '2023-11-28 23:47:19', 1, 1);
INSERT INTO `employee` VALUES (1729478745808945154, '贾龙', '102245', 'b51e8dbebd4ba8a8f342190a4b9f08d7', '15695069802', '1', 1, '2023-11-28 20:34:00', '2023-11-28 20:34:00', 1, 1);
INSERT INTO `employee` VALUES (1729485946174701570, '111', '111', 'e10adc3949ba59abbe56e057f20f883e', '15695069802', '0', 1, '2023-11-28 21:02:37', '2023-11-29 18:26:59', 1, 1);
-- ----------------------------
-- Table structure for hear_case
-- ----------------------------
DROP TABLE IF EXISTS `hear_case`;
CREATE TABLE `hear_case` (
`id` bigint(20) NOT NULL COMMENT 'id',
`case_number` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '案件号',
`case_reason` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '案件来由',
`case_type` int(11) NULL DEFAULT NULL COMMENT '类型',
`court` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '法院',
`case_status` int(11) NULL DEFAULT NULL COMMENT '按键状态',
`judge_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '法官姓名',
`judge_phone` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '法官电话',
`salesman_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '业务员姓名',
`salesman_phone` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '业务员电话',
`create_time` datetime NULL DEFAULT NULL,
`update_time` datetime NULL DEFAULT NULL,
`create_user` bigint(20) NULL DEFAULT NULL,
`update_user` bigint(20) NULL DEFAULT NULL,
`reserved_field1` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段1',
`reserved_field2` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段2',
`reserved_field3` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段3',
`reserved_field4` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段4',
`reserved_field5` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段5',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of hear_case
-- ----------------------------
-- ----------------------------
-- Table structure for money
-- ----------------------------
DROP TABLE IF EXISTS `money`;
CREATE TABLE `money` (
`id` bigint(20) NOT NULL COMMENT 'id',
`case_id` bigint(20) NOT NULL COMMENT '案件id',
`litigation_amount` bigint(32) NULL DEFAULT NULL COMMENT '起诉金',
`preservation_amount` bigint(32) NULL DEFAULT NULL COMMENT '保全金额',
`judicial_action_fee` bigint(32) NULL DEFAULT NULL COMMENT '诉讼费',
`refund` bigint(32) NULL DEFAULT NULL COMMENT '退费',
`Preservation_fee` bigint(32) NULL DEFAULT NULL COMMENT '保全费',
`execute_fee` bigint(32) NULL DEFAULT NULL COMMENT '执行费',
`estimate_fee` bigint(32) NULL DEFAULT NULL COMMENT '评估费',
`result_amount` bigint(32) NULL DEFAULT NULL COMMENT '结果金额',
`result_amount_remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '结果金额备注',
`create_time` datetime NULL DEFAULT NULL,
`update_time` datetime NULL DEFAULT NULL,
`create_user` bigint(20) NULL DEFAULT NULL,
`update_user` bigint(20) NULL DEFAULT NULL,
`reserved_field1` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段1',
`reserved_field2` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段2',
`reserved_field3` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段3',
`reserved_field4` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段4',
`reserved_field5` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段5',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of money
-- ----------------------------
-- ----------------------------
-- Table structure for plaintiff
-- ----------------------------
DROP TABLE IF EXISTS `plaintiff`;
CREATE TABLE `plaintiff` (
`id` bigint(20) NOT NULL COMMENT '原告表id',
`type` int(11) NOT NULL COMMENT '类型1-法人',
`unit_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '单位名称',
`license_type` int(11) NULL DEFAULT NULL COMMENT '证照类型1-统一社会信用代码证',
`license_num` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '证件号码',
`unit_location` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '单位住所地',
`phone_num` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '联系电话',
`create_time` datetime NULL DEFAULT NULL,
`update_time` datetime NULL DEFAULT NULL,
`create_user` bigint(20) NULL DEFAULT NULL,
`update_user` bigint(20) NULL DEFAULT NULL,
`reserved_field1` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段1',
`reserved_field2` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段2',
`reserved_field3` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段3',
`reserved_field4` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段4',
`reserved_field5` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段5',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of plaintiff
-- ----------------------------
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` bigint(20) NOT NULL COMMENT '主键',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '姓名',
`phone` varchar(11) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '手机号',
`status` int(11) NOT NULL DEFAULT 0 COMMENT '状态 0:禁用1:正常',
`username` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '账号:工号',
`password` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '密码',
`admin` varchar(4) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '管理员等级0-超级用户1-管理员2-用户',
`update_time` datetime NOT NULL COMMENT '更新时间',
`create_user` bigint(20) NOT NULL COMMENT '创建人',
`update_user` bigint(20) NOT NULL COMMENT '修改人',
`create_time` datetime NOT NULL COMMENT '创建时间',
`reserved_field1` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段1',
`reserved_field2` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段2',
`reserved_field3` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段3',
`reserved_field4` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段4',
`reserved_field5` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '预留字段5',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_bin COMMENT = '用户信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of user
-- ----------------------------
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -1,7 +1,13 @@
##### 1、账户属性 ## 一、开发规范
账户包括姓名、工号(账号)、密码、电话号码四个属性 ### 1、MySQL数据库规范
##### 2、数据库设计 **命名规范**数据库表的命名全部采用下划线分割法命名字段属性名也采用下划线分割法例如create_timephone_num等。
###### (1)数据库字段命名 **字段属性规范**
1. id类字段统一采用bigint数据类型长度20。
2. type类标志字段统一采用int数据类型长度11。
3. time类字段统一采用datetime数据类型。
4. 其他字段统一采用varchar数据类型长度自定。
5. 所有字段都要在注释后面写该字段代表的属性含义,并且英文命名要便于理解,尽量使用具体的英文单词,避免自己造词。

View File

@ -22,8 +22,9 @@
3. 被告表defendantidtype(当事人类型1-法人)unit_name(单位名称)unit_location(单位住所地)create_time(创建时间)update_time(更新时间)create_user(创建用户)update_user(更新用户)reserved_field1(预留字段1)reserved_field2(预留字段2)reserved_field3(预留字段3)reserved_field4(预留字段4)reserved_field5(预留字段5) 3. 被告表defendantidtype(当事人类型1-法人)unit_name(单位名称)unit_location(单位住所地)create_time(创建时间)update_time(更新时间)create_user(创建用户)update_user(更新用户)reserved_field1(预留字段1)reserved_field2(预留字段2)reserved_field3(预留字段3)reserved_field4(预留字段4)reserved_field5(预留字段5)
4. 代理人表agentidtype(代理人类型1-律师2-法律工作者3-单位推荐4-其他)name(姓名)license_type(证件类型1-居民身份证)license_num(证件号码)phone_num(联系电话)create_time(创建时间)update_time(更新时间)create_user(创建用户)update_user(更新用户)reserved_field1(预留字段1)reserved_field2(预留字段2)reserved_field3(预留字段3)reserved_field4(预留字段4)reserved_field5(预留字段5) 4. 代理人表agentidtype(代理人类型1-律师2-法律工作者3-单位推荐4-其他)name(姓名)license_type(证件类型1-居民身份证)license_num(证件号码)phone_num(联系电话)create_time(创建时间)update_time(更新时间)create_user(创建用户)update_user(更新用户)reserved_field1(预留字段1)reserved_field2(预留字段2)reserved_field3(预留字段3)reserved_field4(预留字段4)reserved_field5(预留字段5)
5. 业务员表salesmanidname(姓名)phone_num(联系电话) 5. 业务员表salesmanidname(姓名)phone_num(联系电话)
6. 审理案件表idcase_number(案件号)case_reason(案件来由)case_type(案件类型)court(法院)case_status(案件状态)judge_name(法官姓名)create_time(创建时间)update_time(更新时间)create_user(创建用户)update_user(更新用户)reserved_field1(预留字段1)reserved_field2(预留字段2)reserved_field3(预留字段3)reserved_field4(预留字段4)reserved_field5(预留字段5) 6. 审理案件表hear_caseidcase_number(案件号)case_reason(案件来由)case_type(案件类型)court(法院)case_status(案件状态)judge_name(法官姓名)judge_phone(法官电话)salesman_name(业务员姓名)salesman_phone(业务员电话)create_time(创建时间)update_time(更新时间)create_user(创建用户)update_user(更新用户)reserved_field1(预留字段1)reserved_field2(预留字段2)reserved_field3(预留字段3)reserved_field4(预留字段4)reserved_field5(预留字段5)
7. 附件表idcase_id(案件id)indictment(附件起诉状)party_prove(当事人身份证明)proxy_prove(委托代理人委托手续和身份材料)evidence(证据材料)deliver_confirm(送达地址确认书)other_materials(其他材料)create_time(创建时间)update_time(更新时间)create_user(创建用户)update_user(更新用户)reserved_field1(预留字段1)reserved_field2(预留字段2)reserved_field3(预留字段3)reserved_field4(预留字段4)reserved_field5(预留字段5) 7. 金额表moneyidcase_id(案件id)litigation_amount(起诉金)preservation_amount(保全金额)judicial_action_fee(诉讼费)refund(退费)Preservation_fee(保全费)execute_fee(执行费)estimate_fee(评估费)result_amount(结果金额)result_amount_remarks(结果金额备注)create_time(创建时间)update_time(更新时间)create_user(创建用户)update_user(更新用户)reserved_field1(预留字段1)reserved_field2(预留字段2)reserved_field3(预留字段3)reserved_field4(预留字段4)reserved_field5(预留字段5)
8. 附件表annexidcase_id(案件id)indictment(附件起诉状)party_prove(当事人身份证明)proxy_prove(委托代理人委托手续和身份材料)evidence(证据材料)deliver_confirm(送达地址确认书)other_materials(其他材料)create_time(创建时间)update_time(更新时间)create_user(创建用户)update_user(更新用户)reserved_field1(预留字段1)reserved_field2(预留字段2)reserved_field3(预留字段3)reserved_field4(预留字段4)reserved_field5(预留字段5)
新建立案:诉讼申请书(附件),内部审批表(附件),起诉状(附件),营业执照(附件),法定代表人身份证明书(附件),法人身份证(附件), 新建立案:诉讼申请书(附件),内部审批表(附件),起诉状(附件),营业执照(附件),法定代表人身份证明书(附件),法人身份证(附件),