-- phpMyAdmin SQL Dump
-- version 5.2.1deb3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 31, 2025 at 10:33 PM
-- Server version: 8.0.44-0ubuntu0.24.04.1
-- PHP Version: 8.3.6

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `ocppproxy`
--

-- --------------------------------------------------------

--
-- Table structure for table `op_server_sessions`
--

CREATE TABLE `op_server_sessions` (
  `id` bigint NOT NULL,
  `chargepoint_id` varchar(255) NOT NULL,
  `connector_id` int NOT NULL DEFAULT '0',
  `transaction_id` bigint NOT NULL,
  `session_start` datetime DEFAULT NULL,
  `session_end` datetime DEFAULT NULL,
  `meter_start` bigint DEFAULT NULL,
  `last_meter_value` bigint DEFAULT NULL,
  `last_meter_ts` datetime DEFAULT NULL,
  `energy_wh` bigint DEFAULT NULL,
  `status` varchar(64) DEFAULT NULL,
  `id_tag` varchar(100) DEFAULT NULL,
  `ended_flag` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `op_server_sessions`
--

INSERT INTO `op_server_sessions` (`id`, `chargepoint_id`, `connector_id`, `transaction_id`, `session_start`, `session_end`, `meter_start`, `last_meter_value`, `last_meter_ts`, `energy_wh`, `status`, `ended_flag`, `created_at`, `updated_at`) VALUES
(1, 'NEXT-WS109410', 1, 524365477, '2025-12-31 21:31:32', NULL, 4468683, 4468683, '2025-12-31 21:31:32', NULL, 'Started', 0, '2025-12-31 21:33:13', '2025-12-31 21:33:13'),
(2, 'NEXT-WS109410', 1, 3947635804, '2025-12-31 21:31:32', NULL, 4468683, 4468683, '2025-12-31 21:31:32', NULL, 'Started', 0, '2025-12-31 21:37:21', '2025-12-31 21:37:21'),
(3, 'NEXT-WS109410', 1, 3625711400, '2025-12-31 21:31:32', NULL, 4468683, 4468683, '2025-12-31 21:31:32', NULL, 'Started', 0, '2025-12-31 21:38:11', '2025-12-31 21:38:11'),
(4, 'NEXT-WS109410', 1, 3587105909, '2025-12-31 21:31:32', NULL, 4468683, 4472234, '2025-12-31 22:33:11', 3551, 'Progress', 0, '2025-12-31 21:39:04', '2025-12-31 22:33:11'),
(5, '7000401922000587', 1, -1, NULL, NULL, NULL, 12925890, '2025-12-31 21:38:30', NULL, 'Progress', 0, '2025-12-31 21:39:25', '2025-12-31 21:39:29'),
(6, '7000730623000032', 1, 1756984753, NULL, NULL, NULL, 2632510, '2025-12-31 21:38:38', NULL, 'Progress', 0, '2025-12-31 21:39:26', '2025-12-31 21:39:30'),
(16, '7000730623000100', 1, 1767099218, NULL, NULL, NULL, 27225080, '2025-12-31 22:32:23', NULL, 'Progress', 0, '2025-12-31 21:39:52', '2025-12-31 22:32:24'),
(18, '7000730523000071', 1, 1767098556, NULL, NULL, NULL, 22059390, '2025-12-31 22:30:22', NULL, 'Progress', 0, '2025-12-31 21:39:54', '2025-12-31 22:30:23'),
(41, '7000730523000092', 1, 1767078569, NULL, NULL, NULL, 23437450, '2025-12-31 22:33:18', NULL, 'Progress', 0, '2025-12-31 21:40:44', '2025-12-31 22:33:20'),
(43, '7000730523000077', 1, 1767098697, NULL, NULL, NULL, 21738860, '2025-12-31 22:33:15', NULL, 'Progress', 0, '2025-12-31 21:40:48', '2025-12-31 22:33:16'),
(44, '7000730523000044', 1, 1767098439, NULL, NULL, NULL, 24770270, '2025-12-31 22:33:18', NULL, 'Progress', 0, '2025-12-31 21:40:49', '2025-12-31 22:33:20'),
(77, '7000730623000064', 1, 1767098207, NULL, NULL, NULL, 25540530, '2025-12-31 22:33:05', NULL, 'Progress', 0, '2025-12-31 21:41:32', '2025-12-31 22:33:06'),
(133, '7000730523000013', 1, 1767098159, NULL, NULL, NULL, 25727540, '2025-12-31 22:32:59', NULL, 'Progress', 0, '2025-12-31 21:43:36', '2025-12-31 22:33:00'),
(141, '7000730623000053', 1, 1767105037, NULL, NULL, NULL, 32180460, '2025-12-31 22:32:35', NULL, 'Progress', 0, '2025-12-31 21:44:05', '2025-12-31 22:32:36'),
(158, '7000730523000031', 1, 1767088826, NULL, NULL, NULL, 29485630, '2025-12-31 22:33:00', NULL, 'Progress', 0, '2025-12-31 21:44:31', '2025-12-31 22:33:01'),
(173, '7000730623000019', 1, 1767098835, NULL, NULL, NULL, 18655390, '2025-12-31 22:33:20', NULL, 'Progress', 0, '2025-12-31 21:44:50', '2025-12-31 22:33:21'),
(278, '7000730523000028', 1, 1767099285, NULL, NULL, NULL, 22738400, '2025-12-31 22:32:25', NULL, 'Progress', 0, '2025-12-31 21:50:02', '2025-12-31 22:32:26');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `op_server_sessions`
--
ALTER TABLE `op_server_sessions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_op_server_sessions` (`chargepoint_id`,`transaction_id`,`connector_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `op_server_sessions`
--
ALTER TABLE `op_server_sessions`
  MODIFY `id` bigint NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=836;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
