-- ----------------------------
-- Table structure for blade_transport_ship
-- ----------------------------
DROP TABLE IF EXISTS `blade_transport_ship`;
CREATE TABLE `blade_transport_ship` (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
  `organization_name` varchar(50) NOT NULL COMMENT '所属组织',
  `ship_name` varchar(50) NOT NULL COMMENT '船舶名',
  `ship_identifier_no` varchar(50) NOT NULL COMMENT '船舶识别号',
  `keel_laying_date` date DEFAULT NULL COMMENT '安放龙骨日期',
  `build_completion_date` date DEFAULT NULL COMMENT '建造完工日期',
  `total_length` decimal(12,2) DEFAULT NULL COMMENT '总长',
  `ship_width` decimal(12,2) DEFAULT NULL COMMENT '船宽',
  `molded_depth` decimal(12,2) DEFAULT NULL COMMENT '型深',
  `max_ship_height` decimal(12,2) DEFAULT NULL COMMENT '最大船高',
  `light_draft` decimal(12,2) DEFAULT NULL COMMENT '空载吃水',
  `full_load_draft` decimal(12,2) DEFAULT NULL COMMENT '满载吃水',
  `navigation_area` varchar(20) DEFAULT NULL COMMENT '航区',
  `ownership_registration_no` varchar(50) DEFAULT NULL COMMENT '登记号码',
  `initial_registration_no` varchar(50) DEFAULT NULL COMMENT '初次登记号码',
  `ship_owner` varchar(50) DEFAULT NULL COMMENT '船舶所有人',
  `ownership_acquisition_date` date DEFAULT NULL COMMENT '取得所有权日期',
  `ship_inspection_no` varchar(50) DEFAULT NULL COMMENT '船检登记号',
  `ship_type` varchar(50) NOT NULL COMMENT '船舶类型',
  `gross_tonnage` decimal(12,2) DEFAULT NULL COMMENT '总吨',
  `net_tonnage` decimal(12,2) DEFAULT NULL COMMENT '净吨',
  `ownership_cert_image` varchar(1000) DEFAULT NULL COMMENT '船舶所有权证书图片',
  `safety_cert_image` varchar(1000) DEFAULT NULL COMMENT '内河船舶安全与环保证书图片',
  `nationality_cert_start_date` date DEFAULT NULL COMMENT '国籍证有效期自',
  `nationality_cert_end_date` date DEFAULT NULL COMMENT '国籍证有效期至',
  `nationality_cert_long_term` int(11) DEFAULT '0' COMMENT '国籍证长期有效：0否 1是',
  `nationality_cert_image` varchar(1000) DEFAULT NULL COMMENT '国籍证图片',
  `safe_manning_cert_start_date` date DEFAULT NULL COMMENT '最低安全配员证书有效期自',
  `safe_manning_cert_end_date` date DEFAULT NULL COMMENT '最低安全配员证书有效期至',
  `safe_manning_cert_long_term` int(11) DEFAULT '0' COMMENT '最低安全配员证书长期有效：0否 1是',
  `safe_manning_cert_image` varchar(1000) DEFAULT NULL COMMENT '最低安全配员证书图片',
  `business_transport_cert_no` varchar(50) DEFAULT NULL COMMENT '营业运输证证书编号',
  `business_transport_cert_issue_date` date DEFAULT NULL COMMENT '营业运输证发证日期',
  `business_transport_cert_end_date` date DEFAULT NULL COMMENT '营业运输证有效期至',
  `business_transport_cert_long_term` int(11) DEFAULT '0' COMMENT '营业运输证长期有效：0否 1是',
  `business_transport_cert_image` varchar(1000) DEFAULT NULL COMMENT '营业运输证图片',
  `lease_start_date` date DEFAULT NULL COMMENT '起租日期',
  `lease_end_date` date DEFAULT NULL COMMENT '承租有效期至',
  `lease_long_term` int(11) DEFAULT '0' COMMENT '承租长期有效：0否 1是',
  `lease_contract_image` varchar(1000) DEFAULT NULL COMMENT '承租合同图片',
  `ship_lessee` varchar(50) DEFAULT NULL COMMENT '船舶承租人',
  `ship_operator` varchar(50) 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,
  UNIQUE KEY `uk_transport_ship_identifier` (`ship_identifier_no`) USING BTREE,
  KEY `idx_transport_ship_name` (`ship_name`) USING BTREE,
  KEY `idx_transport_ship_org` (`organization_name`) USING BTREE,
  KEY `idx_transport_ship_type` (`ship_type`) USING BTREE,
  KEY `idx_transport_ship_nationality_end` (`nationality_cert_end_date`) USING BTREE,
  KEY `idx_transport_ship_safe_end` (`safe_manning_cert_end_date`) USING BTREE,
  KEY `idx_transport_ship_business_end` (`business_transport_cert_end_date`) USING BTREE,
  KEY `idx_transport_ship_lease_end` (`lease_end_date`) USING BTREE,
  KEY `idx_transport_ship_status` (`status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='船舶管理';

-- ----------------------------
-- Records of blade_menu for transport capacity ship
-- ----------------------------
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),
(2079000000000000020, 2079000000000000001, 'transport_ship', '船舶管理', 'transport_ship', '/transportCapacity/ship', 'iconfont icon-chuanbo', 3, 1, 0, 1, '', '', 0),
(2079000000000000021, 2079000000000000020, 'transport_ship_add', '新增', 'transport_ship_add', '', '', 1, 2, 0, 1, NULL, '', 0),
(2079000000000000022, 2079000000000000020, 'transport_ship_edit', '编辑', 'transport_ship_edit', '', '', 2, 2, 0, 1, NULL, '', 0),
(2079000000000000023, 2079000000000000020, 'transport_ship_delete', '删除', 'transport_ship_delete', '', '', 3, 2, 0, 1, NULL, '', 0),
(2079000000000000024, 2079000000000000020, 'transport_ship_view', '查看', 'transport_ship_view', '', '', 4, 2, 0, 1, NULL, '', 0),
(2079000000000000025, 2079000000000000020, 'transport_ship_status', '启停', 'transport_ship_status', '', '', 5, 2, 0, 1, NULL, '', 0),
(2079000000000000026, 2079000000000000020, 'transport_ship_export', '批量导出', 'transport_ship_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`);
