-- ----------------------------
-- Table structure for blade_accident_record
-- ----------------------------
DROP TABLE IF EXISTS `blade_accident_record`;
CREATE TABLE `blade_accident_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 '车牌号/船号',
  `accident_date` date NOT NULL COMMENT '事故发生日期',
  `accident_location` varchar(100) DEFAULT NULL COMMENT '事故发生地点',
  `accident_nature` varchar(20) DEFAULT NULL COMMENT '事故性质',
  `accident_responsibility` varchar(20) DEFAULT NULL COMMENT '事故责任',
  `direct_economic_loss` decimal(18,2) DEFAULT NULL COMMENT '直接经济损失',
  `insurance_claim_amount` decimal(18,2) DEFAULT NULL COMMENT '保险理赔金额',
  `accident_reason_damage` varchar(500) DEFAULT NULL COMMENT '事故原因及损坏情况',
  `attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
  `remark` varchar(200) 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_accident_record_vehicle` (`vehicle_type`,`vehicle_no`) USING BTREE,
  KEY `idx_accident_record_date` (`accident_date`) USING BTREE,
  KEY `idx_accident_record_nature` (`accident_nature`) USING BTREE,
  KEY `idx_accident_record_responsibility` (`accident_responsibility`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='事故记录';

-- ----------------------------
-- Records of blade_menu for accident 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
(2077640000000000001, 2075436235826896898, 'accident_record', '事故记录', 'accident_record', '/vehicle/accident-record', 'iconfont iconicon_doc', 90, 1, 0, 1, '', '', 0),
(2077640000000000002, 2077640000000000001, 'accident_record_add', '新增', 'accident_record_add', '', '', 1, 2, 0, 1, NULL, '', 0),
(2077640000000000003, 2077640000000000001, 'accident_record_edit', '编辑', 'accident_record_edit', '', '', 2, 2, 0, 1, NULL, '', 0),
(2077640000000000004, 2077640000000000001, 'accident_record_delete', '批量删除', 'accident_record_delete', '', '', 3, 2, 0, 1, NULL, '', 0),
(2077640000000000005, 2077640000000000001, 'accident_record_view', '查看', 'accident_record_view', '', '', 4, 2, 0, 1, NULL, '', 0),
(2077640000000000006, 2077640000000000001, 'accident_record_import', '批量导入', 'accident_record_import', '', '', 5, 2, 0, 1, NULL, '', 0),
(2077640000000000007, 2077640000000000001, 'accident_record_template', '下载模板', 'accident_record_template', '', '', 6, 2, 0, 1, NULL, '', 0),
(2077640000000000008, 2077640000000000001, 'accident_record_export', '批量导出', 'accident_record_export', '', '', 7, 2, 0, 1, NULL, '', 0),
(2077640000000000009, 2077640000000000001, 'accident_record_list', '列表', 'accident_record_list', '/blade-transport/accident-record/list', '', 8, 2, 0, 1, NULL, '', 0);
