-- ----------------------------
-- Table structure for blade_transport_vehicle
-- ----------------------------
DROP TABLE IF EXISTS `blade_transport_vehicle`;
CREATE TABLE `blade_transport_vehicle` (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
  `organization_name` varchar(50) NOT NULL COMMENT '所属组织',
  `plate_no` varchar(16) NOT NULL COMMENT '车牌号',
  `plate_color` varchar(20) DEFAULT NULL COMMENT '车牌颜色',
  `vehicle_type` varchar(50) NOT NULL COMMENT '车辆类型',
  `outer_length` int(11) DEFAULT NULL COMMENT '外廓长度，毫米',
  `outer_width` int(11) DEFAULT NULL COMMENT '外廓宽度，毫米',
  `outer_height` int(11) DEFAULT NULL COMMENT '外廓高度，毫米',
  `approved_load_kg` int(11) NOT NULL COMMENT '核定载质量，KG',
  `traction_mass_kg` int(11) DEFAULT NULL COMMENT '准牵引总质量，KG',
  `business_relation` varchar(50) NOT NULL COMMENT '业务关系',
  `energy_type` varchar(50) NOT NULL COMMENT '能源类型',
  `compulsory_scrap_date` date DEFAULT NULL COMMENT '强制报废日期',
  `compulsory_scrap_long_term` int(11) DEFAULT '0' COMMENT '强制报废长期有效：0否 1是',
  `customs_record_no` varchar(50) DEFAULT NULL COMMENT '海关备案号',
  `driving_license_no` varchar(50) NOT NULL COMMENT '行驶证档案编号',
  `driving_license_start_date` date DEFAULT NULL COMMENT '行驶证有效期起',
  `driving_license_end_date` date DEFAULT NULL COMMENT '行驶证有效期止',
  `driving_license_long_term` int(11) DEFAULT '0' COMMENT '行驶证长期有效：0否 1是',
  `driving_license_image` varchar(1000) DEFAULT NULL COMMENT '行驶证主页正面',
  `driving_license_main_back` varchar(1000) DEFAULT NULL COMMENT '行驶证主页反面',
  `driving_license_vice_front` varchar(1000) DEFAULT NULL COMMENT '行驶证副页正面',
  `driving_license_vice_back` varchar(1000) DEFAULT NULL COMMENT '行驶证副页反面',
  `road_transport_cert_no` varchar(50) NOT NULL COMMENT '道路运输证号',
  `road_transport_cert_start_date` date DEFAULT NULL COMMENT '道路运输证有效期起',
  `road_transport_cert_end_date` date DEFAULT NULL COMMENT '道路运输证有效期止',
  `road_transport_cert_long_term` int(11) DEFAULT '0' COMMENT '道路运输证长期有效：0否 1是',
  `road_transport_cert_image` varchar(1000) DEFAULT NULL COMMENT '道路运输证图片',
  `annual_review_end_date` date DEFAULT NULL COMMENT '道路运输年审有效期',
  `annual_review_long_term` int(11) DEFAULT '0' COMMENT '道路运输年审长期有效：0否 1是',
  `registration_no` varchar(50) NOT NULL COMMENT '机动车登记编号',
  `registration_date` date DEFAULT NULL COMMENT '机动车登记日期',
  `registration_image` varchar(1000) DEFAULT NULL COMMENT '机动车登记本图片',
  `remark` varchar(200) DEFAULT NULL COMMENT '备注',
  `certification_status` int(11) DEFAULT '0' COMMENT '认证状态：0认证中 1认证通过 2认证驳回',
  `certification_reject_reason` 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,
  UNIQUE KEY `uk_transport_vehicle_plate_no` (`plate_no`) USING BTREE,
  KEY `idx_transport_vehicle_org` (`organization_name`) USING BTREE,
  KEY `idx_transport_vehicle_type` (`vehicle_type`) USING BTREE,
  KEY `idx_transport_vehicle_relation` (`business_relation`) USING BTREE,
  KEY `idx_transport_vehicle_driving_end` (`driving_license_end_date`) USING BTREE,
  KEY `idx_transport_vehicle_road_end` (`road_transport_cert_end_date`) USING BTREE,
  KEY `idx_transport_vehicle_annual_end` (`annual_review_end_date`) USING BTREE,
  KEY `idx_transport_vehicle_status` (`status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='车辆管理';

-- ----------------------------
-- Records of blade_menu for transport capacity vehicle
-- ----------------------------
INSERT INTO `blade_menu` (`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `component`, `remark`, `is_deleted`) VALUES
(2079000000000000001, 0, 'transport_capacity', '运力管理', 'transport_capacity', '/transportCapacity', 'iconfont icon-yunshu', 20, 1, 0, 1, '', '', 0),
(2079000000000000010, 2079000000000000001, 'transport_vehicle', '车辆管理', 'transport_vehicle', '/transportCapacity/vehicle', 'iconfont icon-qiche', 2, 1, 0, 1, '', '', 0),
(2079000000000000011, 2079000000000000010, 'transport_vehicle_add', '新增', 'transport_vehicle_add', '', '', 1, 2, 0, 1, NULL, '', 0),
(2079000000000000012, 2079000000000000010, 'transport_vehicle_edit', '编辑', 'transport_vehicle_edit', '', '', 2, 2, 0, 1, NULL, '', 0),
(2079000000000000013, 2079000000000000010, 'transport_vehicle_delete', '删除', 'transport_vehicle_delete', '', '', 3, 2, 0, 1, NULL, '', 0),
(2079000000000000014, 2079000000000000010, 'transport_vehicle_view', '查看', 'transport_vehicle_view', '', '', 4, 2, 0, 1, NULL, '', 0),
(2079000000000000015, 2079000000000000010, 'transport_vehicle_status', '启停', 'transport_vehicle_status', '', '', 5, 2, 0, 1, NULL, '', 0),
(2079000000000000016, 2079000000000000010, 'transport_vehicle_export', '批量导出', 'transport_vehicle_export', '', '', 6, 2, 0, 1, NULL, '', 0)
ON DUPLICATE KEY UPDATE
  `parent_id` = VALUES(`parent_id`),
  `code` = VALUES(`code`),
  `name` = VALUES(`name`),
  `alias` = VALUES(`alias`),
  `path` = VALUES(`path`),
  `source` = VALUES(`source`),
  `sort` = VALUES(`sort`),
  `category` = VALUES(`category`),
  `action` = VALUES(`action`),
  `is_open` = VALUES(`is_open`),
  `component` = VALUES(`component`),
  `remark` = VALUES(`remark`),
  `is_deleted` = VALUES(`is_deleted`);
