-- ----------------------------
-- Table structure for blade_violation_record
-- ----------------------------
DROP TABLE IF EXISTS `blade_violation_record`;
CREATE TABLE `blade_violation_record` (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
  `vehicle_type` varchar(20) NOT NULL COMMENT '车船类型',
  `vehicle_no` varchar(30) NOT NULL COMMENT '车牌号/船号',
  `driver_name` varchar(20) NOT NULL COMMENT '驾驶人/船长',
  `violation_type` varchar(50) DEFAULT NULL COMMENT '类型',
  `violation_item` varchar(100) DEFAULT NULL COMMENT '事项',
  `violation_time` datetime NOT NULL COMMENT '违章时间',
  `location` varchar(100) NOT NULL COMMENT '地址',
  `fine_amount` decimal(18,2) DEFAULT NULL COMMENT '被罚金额',
  `deduct_points` int(11) DEFAULT NULL COMMENT '被扣分数',
  `penalty_unit` varchar(50) DEFAULT NULL COMMENT '被罚单位',
  `process_status` varchar(20) NOT NULL DEFAULT '已处理' COMMENT '处理状态',
  `process_description` varchar(500) NOT NULL COMMENT '过程描述',
  `process_result` varchar(500) DEFAULT NULL COMMENT '处理结果',
  `attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
  `create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
  `create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_user` bigint(20) DEFAULT NULL COMMENT '修改人',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int(11) DEFAULT '1' COMMENT '状态',
  `is_deleted` int(11) DEFAULT '0' COMMENT '是否已删除',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_violation_record_vehicle` (`vehicle_type`,`vehicle_no`) USING BTREE,
  KEY `idx_violation_record_driver` (`driver_name`) USING BTREE,
  KEY `idx_violation_record_time` (`violation_time`) USING BTREE,
  KEY `idx_violation_record_status` (`process_status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='违章记录';

-- ----------------------------
-- Records of blade_menu for violation record
-- parent_id 默认挂载至 transport.sql 中的“车/船务管理”：2075436235826896898
-- ----------------------------
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `component`, `remark`, `is_deleted`) VALUES
(2077620000000000001, 2075436235826896898, 'violation_record', '违章记录', 'violation_record', '/vehicle/violation-record', 'iconfont iconicon_doc', 70, 1, 0, 1, '', '', 0),
(2077620000000000002, 2077620000000000001, 'violation_record_add', '新增', 'violation_record_add', '', '', 1, 2, 0, 1, NULL, '', 0),
(2077620000000000003, 2077620000000000001, 'violation_record_edit', '编辑', 'violation_record_edit', '', '', 2, 2, 0, 1, NULL, '', 0),
(2077620000000000004, 2077620000000000001, 'violation_record_delete', '批量删除', 'violation_record_delete', '', '', 3, 2, 0, 1, NULL, '', 0),
(2077620000000000005, 2077620000000000001, 'violation_record_view', '查看', 'violation_record_view', '', '', 4, 2, 0, 1, NULL, '', 0),
(2077620000000000006, 2077620000000000001, 'violation_record_import', '批量导入', 'violation_record_import', '', '', 5, 2, 0, 1, NULL, '', 0),
(2077620000000000007, 2077620000000000001, 'violation_record_template', '下载模板', 'violation_record_template', '', '', 6, 2, 0, 1, NULL, '', 0),
(2077620000000000008, 2077620000000000001, 'violation_record_export', '批量导出', 'violation_record_export', '', '', 7, 2, 0, 1, NULL, '', 0),
(2077620000000000009, 2077620000000000001, 'violation_record_list', '列表', 'violation_record_list', '/blade-transport/violation-record/list', '', 8, 2, 0, 1, NULL, '', 0);
