Commit d0a7414b by xmh

添加文档

1 parent 3370b9ba
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<!-- 数据库驱动 -->
<classPathEntry location="libs/mysql-connector-java-8.0.25.jar"/>
<context id="DB2Tables" targetRuntime="MyBatis3" defaultModelType="flat" >
<property name="autoDelimitKeywords" value="true"/>
<property name="xmlMergeable" value="false"/>
<property name="endingDelimiter" value="`"/>
<property name="beginningDelimiter" value="`"/>
<property name="basePackage" value="com.viontech.fanxing.commons.base"/>
<commentGenerator>
<property name="suppressDate" value="true"/>
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
<property name="suppressAllComments" value="true"/>
</commentGenerator>
<!--数据库链接URL,用户名、密码 -->
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
connectionURL="jdbc:mysql://192.168.9.233:3306/fanxing3" userId="root"
password="123456"/>
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- 生成模型的包名和位置-->
<javaModelGenerator targetPackage="com.viontech.fanxing.code.model" targetProject="F:\mybatis-generator\fanxing-code">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
<property name="rootClass" value="com.viontech.fanxing.commons.base.BaseModel"/>
</javaModelGenerator>
<!-- 生成映射文件的包名和位置-->
<sqlMapGenerator targetPackage="com.viontech.fanxing.code.mapping" targetProject="F:\mybatis-generator\fanxing-code">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<!-- 生成DAO的包名和位置-->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.viontech.fanxing.code.mapper" targetProject="F:\mybatis-generator\fanxing-code" >
<property name="enableSubPackages" value="true"/>
<property name="rootInterface" value="com.viontech.fanxing.commons.base.BaseMapper"/>
</javaClientGenerator>
<table delimitIdentifiers="true" tableName="s_dict_cate" alias="dictCate" domainObjectName="DictCate">
<generatedKey column="id" sqlStatement="JDBC"/>
</table>
<table delimitIdentifiers="true" tableName="s_dict_code" alias="dictCode" domainObjectName="DictCode">
<generatedKey column="id" sqlStatement="JDBC"/>
</table>
</context>
</generatorConfiguration>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<!-- 数据库驱动 -->
<classPathEntry location="libs/mysql-connector-java-8.0.25.jar"/>
<context id="DB2Tables" targetRuntime="MyBatis3" defaultModelType="flat" >
<property name="autoDelimitKeywords" value="true"/>
<property name="xmlMergeable" value="false"/>
<property name="endingDelimiter" value="`"/>
<property name="beginningDelimiter" value="`"/>
<property name="basePackage" value="com.viontech.fanxing.commons.base"/>
<commentGenerator>
<property name="suppressDate" value="true"/>
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
<property name="suppressAllComments" value="true"/>
</commentGenerator>
<!--数据库链接URL,用户名、密码 -->
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
connectionURL="jdbc:mysql://192.168.9.233:3306/fanxing3" userId="root"
password="123456"/>
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- 生成模型的包名和位置-->
<javaModelGenerator targetPackage="com.viontech.fanxing.commons.model" targetProject="F:\mybatis-generator\fanxing-forward">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
<property name="rootClass" value="com.viontech.fanxing.commons.base.BaseModel"/>
</javaModelGenerator>
<!-- 生成映射文件的包名和位置-->
<sqlMapGenerator targetPackage="com.viontech.fanxing.commons.mapping" targetProject="F:\mybatis-generator\fanxing-forward">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<!-- 生成DAO的包名和位置-->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.viontech.fanxing.query.mapper" targetProject="F:\mybatis-generator\fanxing-forward" >
<property name="enableSubPackages" value="true"/>
<property name="rootInterface" value="com.viontech.fanxing.commons.base.BaseMapper"/>
</javaClientGenerator>
<table delimitIdentifiers="true" tableName="s_forward" alias="forward" domainObjectName="Forward">
<generatedKey column="id" sqlStatement="JDBC"/>
</table>
<table delimitIdentifiers="true" tableName="s_forward_config" alias="forwardConfig" domainObjectName="ForwardConfig">
<generatedKey column="id" sqlStatement="JDBC"/>
</table>
<table delimitIdentifiers="true" tableName="d_behavior" alias="behavior" domainObjectName="Behavior">
<generatedKey column="id" sqlStatement="JDBC"/>
</table>
<table delimitIdentifiers="true" tableName="d_flow_event" alias="flowEvent" domainObjectName="FlowEvent">
<generatedKey column="id" sqlStatement="JDBC"/>
</table>
<table delimitIdentifiers="true" tableName="d_flow_data" alias="flowData" domainObjectName="FlowData">
<generatedKey column="id" sqlStatement="JDBC"/>
</table>
<table delimitIdentifiers="true" tableName="d_traffic" alias="traffic" domainObjectName="Traffic">
<generatedKey column="id" sqlStatement="JDBC"/>
</table>
<table delimitIdentifiers="true" tableName="d_traffic_face" alias="trafficFace" domainObjectName="TrafficFace">
<generatedKey column="id" sqlStatement="JDBC"/>
</table>
</context>
</generatorConfiguration>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<!-- 数据库驱动 -->
<classPathEntry location="libs/mysql-connector-java-8.0.25.jar"/>
<context id="DB2Tables" targetRuntime="MyBatis3" defaultModelType="flat" >
<property name="autoDelimitKeywords" value="true"/>
<property name="xmlMergeable" value="false"/>
<property name="endingDelimiter" value="`"/>
<property name="beginningDelimiter" value="`"/>
<property name="basePackage" value="com.viontech.fanxing.commons.base"/>
<commentGenerator>
<property name="suppressDate" value="true"/>
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
<property name="suppressAllComments" value="true"/>
</commentGenerator>
<!--数据库链接URL,用户名、密码 -->
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
connectionURL="jdbc:mysql://192.168.9.233:3306/fanxing3" userId="root"
password="123456"/>
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- 生成模型的包名和位置-->
<javaModelGenerator targetPackage="com.viontech.fanxing.task.manager.model" targetProject="F:\mybatis-generator\fanxing-task">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
<property name="rootClass" value="com.viontech.fanxing.commons.base.BaseModel"/>
</javaModelGenerator>
<!-- 生成映射文件的包名和位置-->
<sqlMapGenerator targetPackage="com.viontech.fanxing.task.manager.mapping" targetProject="F:\mybatis-generator\fanxing-task">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<!-- 生成DAO的包名和位置-->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.viontech.fanxing.task.manager.mapper" targetProject="F:\mybatis-generator\fanxing-task" >
<property name="enableSubPackages" value="true"/>
<property name="rootInterface" value="com.viontech.fanxing.commons.base.BaseMapper"/>
</javaClientGenerator>
<table delimitIdentifiers="true" tableName="s_task" alias="task" domainObjectName="Task">
<generatedKey column="id" sqlStatement="JDBC"/>
</table>
<table delimitIdentifiers="true" tableName="s_store_config" alias="storeConfig" domainObjectName="StoreConfig">
<generatedKey column="id" sqlStatement="JDBC"/>
</table>
</context>
</generatorConfiguration>
-- s_task 任务信息表
CREATE TABLE IF NOT EXISTS s_task(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
name VARCHAR(128) NOT NULL COMMENT '任务名称',
alg_type VARCHAR(36) NOT NULL COMMENT '算法类型',
resource_need FLOAT NOT NULL COMMENT '任务所需资源数量',
priority INT NOT NULL DEFAULT 0 COMMENT '任务优先级',
store_config_id BIGINT NOT NULL COMMENT '存储配置id',
va_type VARCHAR(36) COMMENT '算法分析设备类型',
runtime_type INT NOT NULL DEFAULT 0 COMMENT '任务执行时间类型,全天分时段等',
runtime_conf TEXT COMMENT '任务执行时间段的配置',
device_unid VARCHAR(36) COMMENT '相机设备unid',
channel_unid VARCHAR(36) COMMENT '相机通道unid',
stream_path VARCHAR(1024) COMMENT '视频流地址',
stream_type INT COMMENT '视频流类型',
scene TEXT COMMENT '场景配置,包含画线预置位等',
create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
status INT NOT NULL DEFAULT 0 COMMENT '任务状态',
INDEX s_task_name(name)
);
-- s_store_config 存储配置表
CREATE TABLE IF NOT EXISTS s_store_config(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
name VARCHAR(256) NOT NULL COMMENT '存储配置名称',
content_format INT NOT NULL COMMENT '配置内容格式,如xml',
content TEXT NOT NULL COMMENT '配置内容',
create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
status INT NOT NULL DEFAULT 0 COMMENT '状态'
);
-- s_forward 转发信息表
CREATE TABLE IF NOT EXISTS s_forward(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
name VARCHAR(256) NOT NULL COMMENT '转发名称',
url VARCHAR(1024) NOT NULL COMMENT '转发地址',
total BIGINT NOT NULL DEFAULT 0 COMMENT '转发数据总量',
failed BIGINT NOT NULL DEFAULT 0 COMMENT '失败数量',
last_send_time TIMESTAMP COMMENT '最后发送时间',
create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
status INT NOT NULL DEFAULT 0 COMMENT '状态'
);
-- s_forward_config 转发配置表
CREATE TABLE IF NOT EXISTS s_forward_config(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
forward_id BIGINT NOT NULL COMMENT '转发信息id',
event_cate VARCHAR(36) NOT NULL,
event_type VARCHAR(36) NOT NULL
);
-- d_traffic
CREATE TABLE IF NOT EXISTS d_traffic(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
task_id BIGINT COMMENT '任务id',
event_cate VARCHAR(36),
event_type VARCHAR(36),
event_dt TIMESTAMP NOT NULL COMMENT '事件时间',
channel_unid VARCHAR(36) COMMENT '通道unid',
plate_color VARCHAR(36) COMMENT '车牌颜色',
plate_number VARCHAR(36) COMMENT '车牌号码',
location_code VARCHAR(36) COMMENT '位置编码',
location_name VARCHAR(500) COMMENT '位置名称',
lane_code VARCHAR(36) COMMENT '车道编码',
direction_code VARCHAR(36) COMMENT '卡口方向',
vehicle_type VARCHAR(36) COMMENT '车辆类型',
vehicle_color VARCHAR(36) COMMENT '车身颜色',
vehicle_logo VARCHAR(36) COMMENT '车标编码',
illegal_code VARCHAR(36) COMMENT '违法行为',
illegal_state INT COMMENT '违法行为是否可用',
feature_annual_inspection_mark SMALLINT DEFAULT 0 COMMENT '年检标',
feature_pendant SMALLINT DEFAULT 0 COMMENT '吊坠',
feature_decoration SMALLINT DEFAULT 0 COMMENT '摆件',
feature_sun_shield SMALLINT DEFAULT 0 COMMENT '遮阳板',
xcycle_type VARCHAR(36) COMMENT '非机动车类型',
event_id VARCHAR(36) COMMENT '事件唯一id' ,
special_type VARCHAR(36),
with_helmet INT COMMENT '是否戴头盔0不带',
json_data TEXT COMMENT '原始数据',
pic_name VARCHAR(256),
video_name VARCHAR(256),
status INT NOT NULL DEFAULT 0 COMMENT '状态'
);
-- d_traffic_face
CREATE TABLE IF NOT EXISTS d_traffic_face(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
traffic_id BIGINT NOT NULL COMMENT 'trafficId',
state SMALLINT NOT NULL DEFAULT 1,
sex SMALLINT NOT NULL DEFAULT 0,
upper_color VARCHAR(36),
lower_color VARCHAR(36),
INDEX s_task_name(traffic_id)
);
-- d_flow_data
CREATE TABLE IF NOT EXISTS d_flow_data(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
flow_event_id BIGINT COMMENT 'eventId',
task_id BIGINT,
detection_type VARCHAR(36) COMMENT '检测类型(bus,big_vehicle,xcycle等)',
road_code VARCHAR(36) COMMENT '道路编码',
direction_code VARCHAR(36) COMMENT '方向编码',
sample_dura BIGINT,
sample_num FLOAT,
velocity FLOAT COMMENT '速率',
velocity_unit VARCHAR(16) COMMENT '速率单位',
occupy FLOAT COMMENT '车道占有率',
distance FLOAT COMMENT '车头间距',
queue_length FLOAT COMMENT '车辆排队长度',
region_id VARCHAR(36),
region_name VARCHAR(128),
position_content TEXT,
head_content TEXT,
area FLOAT,
density FLOAT,
sample_num_in FLOAT,
sample_num_out FLOAT,
event_time TIMESTAMP,
dist_time FLOAT,
time_occupy FLOAT,
status INT NOT NULL DEFAULT 0 COMMENT '状态'
);
-- d_flow_event
CREATE TABLE IF NOT EXISTS d_flow_event(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
task_id BIGINT COMMENT '任务id',
event_type VARCHAR(36),
event_time TIMESTAMP COMMENT '事件时间',
event_id VARCHAR(36) COMMENT '事件唯一id',
device_code VARCHAR(36),
device_name VARCHAR(64),
location_code VARCHAR(36),
location_name VARCHAR(64),
json_data TEXT,
pic_name VARCHAR(256),
video_name VARCHAR(256)
);
-- d_behavior
CREATE TABLE IF NOT EXISTS d_behavior(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
task_id BIGINT,
event_type VARCHAR(36),
event_cate VARCHAR(36),
event_refid VARCHAR(36),
event_time TIMESTAMP,
aux_dev_info TEXT,
event_data TEXT,
pics TEXT,
video TEXT,
channel_unid VARCHAR(36),
test_pic_file VARCHAR(256),
test_frame_no VARCHAR(256),
task_name VARCHAR(128),
event_data_num VARCHAR(36)
);
-- s_dict_cate
CREATE TABLE IF NOT EXISTS s_dict_cate(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
type VARCHAR(36) COMMENT '分类'
code VARCHAR(36) COMMENT 'cate编码',
name VARCHAR(36) NOT NULL COMMENT 'cate名称',
note VARCHAR(36) COMMENT '注释'
);
-- s_dict_code
CREATE TABLE IF NOT EXISTS s_dict_code(
id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
unid VARCHAR(36) NOT NULL DEFAULT (UUID()),
cate_id BIGINT NOT NULL,
parent_id BIGINT COMMENT '上级code的id',
code VARCHAR(36) COMMENT 'code编码',
name VARCHAR(36) NOT NULL COMMENT 'code名称',
note VARCHAR(36) COMMENT '注释',
INDEX s_dict_code(cate_id)
);
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!