-- ----------------------------
-- Table structure for blade_oil_electric_record
-- ----------------------------
DROP TABLE IF EXISTS `blade_oil_electric_record`;
CREATE TABLE `blade_oil_electric_record` (
  `id` bigint(20) NOT NULL COMMENT '主键',
  `tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
  `card_no` varchar(30) DEFAULT NULL COMMENT '卡号',
  `transaction_time` datetime NOT NULL COMMENT '交易时间',
  `vehicle_type` varchar(20) NOT NULL COMMENT '车船类型',
  `fee_type` varchar(20) NOT NULL COMMENT '费用类型',
  `oil_product` varchar(50) DEFAULT NULL COMMENT '油品',
  `vehicle_no` varchar(30) NOT NULL COMMENT '车牌号/船号',
  `card_holder` varchar(20) DEFAULT NULL COMMENT '持卡人',
  `data_source` varchar(20) DEFAULT '手工录入' COMMENT '数据来源',
  `quantity` decimal(18,2) DEFAULT NULL COMMENT '数量',
  `unit_price` decimal(18,2) DEFAULT NULL COMMENT '单价',
  `transaction_amount` decimal(18,2) NOT NULL COMMENT '交易金额',
  `balance` decimal(18,2) DEFAULT NULL COMMENT '余额',
  `station` varchar(50) 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_oil_electric_record_vehicle` (`vehicle_type`,`vehicle_no`) USING BTREE,
  KEY `idx_oil_electric_record_fee_type` (`fee_type`) USING BTREE,
  KEY `idx_oil_electric_record_transaction_time` (`transaction_time`) USING BTREE,
  KEY `idx_oil_electric_record_amount` (`transaction_amount`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='油电记录';

-- ----------------------------
-- Records of blade_menu for oil electric 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
(2077680000000000001, 2075436235826896898, 'oil_electric_record', '油电记录', 'oil_electric_record', '/vehicle/oil-electric-record', 'iconfont iconicon_doc', 130, 1, 0, 1, '', '', 0),
(2077680000000000002, 2077680000000000001, 'oil_electric_record_add', '新增', 'oil_electric_record_add', '', '', 1, 2, 0, 1, NULL, '', 0),
(2077680000000000003, 2077680000000000001, 'oil_electric_record_edit', '编辑', 'oil_electric_record_edit', '', '', 2, 2, 0, 1, NULL, '', 0),
(2077680000000000004, 2077680000000000001, 'oil_electric_record_delete', '批量删除', 'oil_electric_record_delete', '', '', 3, 2, 0, 1, NULL, '', 0),
(2077680000000000005, 2077680000000000001, 'oil_electric_record_view', '查看', 'oil_electric_record_view', '', '', 4, 2, 0, 1, NULL, '', 0),
(2077680000000000006, 2077680000000000001, 'oil_electric_record_import', '批量导入', 'oil_electric_record_import', '', '', 5, 2, 0, 1, NULL, '', 0),
(2077680000000000007, 2077680000000000001, 'oil_electric_record_template', '下载模板', 'oil_electric_record_template', '', '', 6, 2, 0, 1, NULL, '', 0),
(2077680000000000008, 2077680000000000001, 'oil_electric_record_export', '批量导出', 'oil_electric_record_export', '', '', 7, 2, 0, 1, NULL, '', 0),
(2077680000000000009, 2077680000000000001, 'oil_electric_record_list', '列表', 'oil_electric_record_list', '/blade-transport/oil-electric-record/list', '', 8, 2, 0, 1, NULL, '', 0);
