-- Potato Farm Manager database backup
-- Generated: 2026-07-24 07:44:36

CREATE TABLE `admin_users` (
  `id` int NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `password` varchar(255) NOT NULL,
  `email` varchar(100) DEFAULT NULL,
  `role` enum('admin','staff') DEFAULT 'staff',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `admin_users` (`id`, `username`, `password`, `email`, `role`, `created_at`) VALUES
('1', 'admin', '$2y$10$lh8hx94y.QIfZ/dGZ8B4HO78sSIUflc8FlSKAG3rlp4.7LQakdnji', 'admin@rentsystem.com', 'admin', '2026-05-15 08:38:55'),
('2', 'bim', '$2y$10$4e9HqcsJZyfZ6YdXG25Xge9wjtmyttSXWarX9cdOGvxOrNDgQgFMC', 'newadmin@example.com', 'admin', '2026-05-24 06:43:50');

CREATE TABLE `balances` (
  `id` int NOT NULL AUTO_INCREMENT,
  `house_id` int NOT NULL,
  `tenant_id` int NOT NULL,
  `rent_balance` decimal(10,2) DEFAULT '0.00',
  `water_balance` decimal(10,2) DEFAULT '0.00',
  `last_updated` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `house_id` (`house_id`),
  KEY `tenant_id` (`tenant_id`),
  CONSTRAINT `balances_ibfk_1` FOREIGN KEY (`house_id`) REFERENCES `houses` (`id`) ON DELETE CASCADE,
  CONSTRAINT `balances_ibfk_2` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `balances` (`id`, `house_id`, `tenant_id`, `rent_balance`, `water_balance`, `last_updated`) VALUES
('10', '1', '11', '-5640.00', '0.00', '2026-06-27 14:13:10'),
('12', '4', '13', '-91199.00', '0.00', '2026-05-30 03:39:59'),
('13', '9', '14', '-8566.00', '0.00', '2026-05-19 21:45:45'),
('14', '10', '15', '-56000.00', '0.00', '2026-05-24 05:43:48'),
('15', '14', '16', '1700.00', '0.00', '2026-06-11 12:47:37'),
('16', '5', '17', '11980.00', '0.00', '2026-06-27 14:16:45');

CREATE TABLE `crop_photos` (
  `id` int NOT NULL AUTO_INCREMENT,
  `planting_id` int NOT NULL,
  `file_path` varchar(500) NOT NULL,
  `taken_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_planting_date` (`planting_id`,`taken_at` DESC),
  CONSTRAINT `crop_photos_ibfk_1` FOREIGN KEY (`planting_id`) REFERENCES `plantings` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

CREATE TABLE `dating_blocks` (
  `block_id` int NOT NULL AUTO_INCREMENT,
  `blocker_id` int NOT NULL,
  `blocked_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`block_id`),
  UNIQUE KEY `uniq_block` (`blocker_id`,`blocked_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `dating_blocks` (`block_id`, `blocker_id`, `blocked_id`, `created_at`) VALUES
('1', '3', '2', '2026-07-23 11:50:52');

CREATE TABLE `dating_call_signals` (
  `signal_id` int NOT NULL AUTO_INCREMENT,
  `call_id` int NOT NULL,
  `from_user_id` int NOT NULL,
  `to_user_id` int NOT NULL,
  `signal_type` varchar(20) NOT NULL,
  `payload` mediumtext NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`signal_id`),
  KEY `idx_call_to` (`call_id`,`to_user_id`,`signal_id`)
) ENGINE=InnoDB AUTO_INCREMENT=134 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `dating_call_signals` (`signal_id`, `call_id`, `from_user_id`, `to_user_id`, `signal_type`, `payload`, `created_at`) VALUES
('1', '1', '2', '3', 'offer', '{\"sdp\":\"v=0\\r\\no=- 1635520259878958694 2 IN IP4 127.0.0.1\\r\\ns=-\\r\\nt=0 0\\r\\na=group:BUNDLE 0\\r\\na=extmap-allow-mixed\\r\\na=msid-semantic: WMS 85bb6850-4e3f-473e-b243-251d2196f3d0\\r\\nm=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126\\r\\nc=IN IP4 0.0.0.0\\r\\na=rtcp:9 IN IP4 0.0.0.0\\r\\na=ice-ufrag:ib8x\\r\\na=ice-pwd:Xs7RwOaU+HeqmKHm4gaHFvXT\\r\\na=ice-options:trickle\\r\\na=fingerprint:sha-256 55:04:88:96:5B:00:FE:FE:DC:8D:7B:FB:9B:27:3C:E2:1C:C3:95:A1:A9:06:35:1A:DE:70:EA:E8:DC:59:D1:23\\r\\na=setup:actpass\\r\\na=mid:0\\r\\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\\r\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\r\\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\\r\\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\\r\\na=sendrecv\\r\\na=msid:85bb6850-4e3f-473e-b243-251d2196f3d0 dddad354-09ef-4ad4-9063-bb29425ed5e0\\r\\na=rtcp-mux\\r\\na=rtcp-rsize\\r\\na=rtpmap:111 opus/48000/2\\r\\na=rtcp-fb:111 transport-cc\\r\\na=fmtp:111 minptime=10;useinbandfec=1\\r\\na=rtpmap:63 red/48000/2\\r\\na=fmtp:63 111/111\\r\\na=rtpmap:9 G722/8000\\r\\na=rtpmap:0 PCMU/8000\\r\\na=rtpmap:8 PCMA/8000\\r\\na=rtpmap:13 CN/8000\\r\\na=rtpmap:110 telephone-event/48000\\r\\na=rtpmap:126 telephone-event/8000\\r\\na=ssrc:3985338172 cname:I8N9uRBH/g2sxr8W\\r\\na=ssrc:3985338172 msid:85bb6850-4e3f-473e-b243-251d2196f3d0 dddad354-09ef-4ad4-9063-bb29425ed5e0\\r\\n\",\"type\":\"offer\"}', '2026-07-22 08:20:38'),
('2', '1', '2', '3', 'candidate', '{\"candidate\":\"candidate:1130607267 1 udp 2113937151 10.22.85.193 51221 typ host generation 0 ufrag ib8x network-cost 999\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"ib8x\"}', '2026-07-22 08:20:38'),
('3', '1', '2', '3', 'candidate', '{\"candidate\":\"candidate:1655461392 1 udp 1677729535 154.159.237.193 22051 typ srflx raddr 10.22.85.193 rport 51221 generation 0 ufrag ib8x network-cost 999\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"ib8x\"}', '2026-07-22 08:20:38'),
('4', '1', '2', '3', 'hangup', '{\"reason\":\"user_hangup\"}', '2026-07-22 08:20:52'),
('5', '2', '2', '4', 'offer', '{\"sdp\":\"v=0\\r\\no=- 4180744192122583332 2 IN IP4 127.0.0.1\\r\\ns=-\\r\\nt=0 0\\r\\na=group:BUNDLE 0 1\\r\\na=extmap-allow-mixed\\r\\na=msid-semantic: WMS 982f98c9-710d-4e49-acbc-daddd32f9162\\r\\nm=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126\\r\\nc=IN IP4 0.0.0.0\\r\\na=rtcp:9 IN IP4 0.0.0.0\\r\\na=ice-ufrag:SYZJ\\r\\na=ice-pwd:kK8aw7Sgypz1/V+0gWMMDrb7\\r\\na=ice-options:trickle\\r\\na=fingerprint:sha-256 91:30:DE:33:C2:8F:49:C6:76:E3:D1:D0:34:08:01:7D:27:C2:21:E3:EB:AE:9C:A6:FC:D2:F0:91:62:C1:AC:22\\r\\na=setup:actpass\\r\\na=mid:0\\r\\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\\r\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\r\\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\\r\\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\\r\\na=sendrecv\\r\\na=msid:982f98c9-710d-4e49-acbc-daddd32f9162 0bc84655-6b04-484a-8817-488d3f6682f2\\r\\na=rtcp-mux\\r\\na=rtcp-rsize\\r\\na=rtpmap:111 opus/48000/2\\r\\na=rtcp-fb:111 transport-cc\\r\\na=fmtp:111 minptime=10;useinbandfec=1\\r\\na=rtpmap:63 red/48000/2\\r\\na=fmtp:63 111/111\\r\\na=rtpmap:9 G722/8000\\r\\na=rtpmap:0 PCMU/8000\\r\\na=rtpmap:8 PCMA/8000\\r\\na=rtpmap:13 CN/8000\\r\\na=rtpmap:110 telephone-event/48000\\r\\na=rtpmap:126 telephone-event/8000\\r\\na=ssrc:563808811 cname:I4KF3Cn0pqnJpNp6\\r\\na=ssrc:563808811 msid:982f98c9-710d-4e49-acbc-daddd32f9162 0bc84655-6b04-484a-8817-488d3f6682f2\\r\\nm=video 9 UDP/TLS/RTP/SAVPF 96 97 39 40 98 99 103 104 119 120 109 114 115 116 45 46 123 124 125\\r\\nc=IN IP4 0.0.0.0\\r\\na=rtcp:9 IN IP4 0.0.0.0\\r\\na=ice-ufrag:SYZJ\\r\\na=ice-pwd:kK8aw7Sgypz1/V+0gWMMDrb7\\r\\na=ice-options:trickle\\r\\na=fingerprint:sha-256 91:30:DE:33:C2:8F:49:C6:76:E3:D1:D0:34:08:01:7D:27:C2:21:E3:EB:AE:9C:A6:FC:D2:F0:91:62:C1:AC:22\\r\\na=setup:actpass\\r\\na=mid:1\\r\\na=extmap:14 urn:ietf:params:rtp-hdrext:toffset\\r\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\r\\na=extmap:13 urn:3gpp:video-orientation\\r\\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\\r\\na=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\\r\\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\\r\\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\\r\\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\\r\\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\\r\\na=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\\r\\na=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\\r\\na=sendrecv\\r\\na=msid:982f98c9-710d-4e49-acbc-daddd32f9162 8de0102e-1758-44d2-b8d8-ab8292b54d7c\\r\\na=rtcp-mux\\r\\na=rtcp-rsize\\r\\na=rtpmap:96 VP8/90000\\r\\na=rtcp-fb:96 goog-remb\\r\\na=rtcp-fb:96 transport-cc\\r\\na=rtcp-fb:96 ccm fir\\r\\na=rtcp-fb:96 nack\\r\\na=rtcp-fb:96 nack pli\\r\\na=rtpmap:97 rtx/90000\\r\\na=fmtp:97 apt=96\\r\\na=rtpmap:39 AV1/90000\\r\\na=rtcp-fb:39 goog-remb\\r\\na=rtcp-fb:39 transport-cc\\r\\na=rtcp-fb:39 ccm fir\\r\\na=rtcp-fb:39 nack\\r\\na=rtcp-fb:39 nack pli\\r\\na=fmtp:39 level-idx=5;profile=0;tier=0\\r\\na=rtpmap:40 rtx/90000\\r\\na=fmtp:40 apt=39\\r\\na=rtpmap:98 VP9/90000\\r\\na=rtcp-fb:98 goog-remb\\r\\na=rtcp-fb:98 transport-cc\\r\\na=rtcp-fb:98 ccm fir\\r\\na=rtcp-fb:98 nack\\r\\na=rtcp-fb:98 nack pli\\r\\na=fmtp:98 profile-id=0\\r\\na=rtpmap:99 rtx/90000\\r\\na=fmtp:99 apt=98\\r\\na=rtpmap:103 H264/90000\\r\\na=rtcp-fb:103 goog-remb\\r\\na=rtcp-fb:103 transport-cc\\r\\na=rtcp-fb:103 ccm fir\\r\\na=rtcp-fb:103 nack\\r\\na=rtcp-fb:103 nack pli\\r\\na=fmtp:103 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\\r\\na=rtpmap:104 rtx/90000\\r\\na=fmtp:104 apt=103\\r\\na=rtpmap:119 H264/90000\\r\\na=rtcp-fb:119 goog-remb\\r\\na=rtcp-fb:119 transport-cc\\r\\na=rtcp-fb:119 ccm fir\\r\\na=rtcp-fb:119 nack\\r\\na=rtcp-fb:119 nack pli\\r\\na=fmtp:119 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\\r\\na=rtpmap:120 rtx/90000\\r\\na=fmtp:120 apt=119\\r\\na=rtpmap:109 H264/90000\\r\\na=rtcp-fb:109 goog-remb\\r\\na=rtcp-fb:109 transport-cc\\r\\na=rtcp-fb:109 ccm fir\\r\\na=rtcp-fb:109 nack\\r\\na=rtcp-fb:109 nack pli\\r\\na=fmtp:109 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f\\r\\na=rtpmap:114 rtx/90000\\r\\na=fmtp:114 apt=109\\r\\na=rtpmap:115 H264/90000\\r\\na=rtcp-fb:115 goog-remb\\r\\na=rtcp-fb:115 transport-cc\\r\\na=rtcp-fb:115 ccm fir\\r\\na=rtcp-fb:115 nack\\r\\na=rtcp-fb:115 nack pli\\r\\na=fmtp:115 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f\\r\\na=rtpmap:116 rtx/90000\\r\\na=fmtp:116 apt=115\\r\\na=rtpmap:45 H265/90000\\r\\na=rtcp-fb:45 goog-remb\\r\\na=rtcp-fb:45 transport-cc\\r\\na=rtcp-fb:45 ccm fir\\r\\na=rtcp-fb:45 nack\\r\\na=rtcp-fb:45 nack pli\\r\\na=fmtp:45 level-id=90;profile-id=1;tier-flag=0;tx-mode=SRST\\r\\na=rtpmap:46 rtx/90000\\r\\na=fmtp:46 apt=45\\r\\na=rtpmap:123 red/90000\\r\\na=rtpmap:124 rtx/90000\\r\\na=fmtp:124 apt=123\\r\\na=rtpmap:125 ulpfec/90000\\r\\na=ssrc-group:FID 2534378043 3382203082\\r\\na=ssrc:2534378043 cname:I4KF3Cn0pqnJpNp6\\r\\na=ssrc:2534378043 msid:982f98c9-710d-4e49-acbc-daddd32f9162 8de0102e-1758-44d2-b8d8-ab8292b54d7c\\r\\na=ssrc:3382203082 cname:I4KF3Cn0pqnJpNp6\\r\\na=ssrc:3382203082 msid:982f98c9-710d-4e49-acbc-daddd32f9162 8de0102e-1758-44d2-b8d8-ab8292b54d7c\\r\\n\",\"type\":\"offer\"}', '2026-07-22 08:22:54'),
('6', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:93536750 1 udp 2122260223 10.84.8.204 59633 typ host generation 0 ufrag SYZJ network-id 1 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:54'),
('7', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:822957646 1 udp 2122129151 10.22.85.193 46841 typ host generation 0 ufrag SYZJ network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:54'),
('8', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:1179280260 1 udp 2122194687 100.20.163.176 41799 typ host generation 0 ufrag SYZJ network-id 2 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:54'),
('9', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:1179280260 1 udp 2122194687 100.20.163.176 43048 typ host generation 0 ufrag SYZJ network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('10', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:2278211655 1 udp 2122063615 10.125.47.95 50215 typ host generation 0 ufrag SYZJ network-id 4 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('11', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:4214855034 1 tcp 1518280447 10.84.8.204 9 typ host tcptype active generation 0 ufrag SYZJ network-id 1 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('12', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:2278211655 1 udp 2122063615 10.125.47.95 50663 typ host generation 0 ufrag SYZJ network-id 4 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('13', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:822957646 1 udp 2122129151 10.22.85.193 43025 typ host generation 0 ufrag SYZJ network-id 3 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('14', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:93536750 1 udp 2122260223 10.84.8.204 54674 typ host generation 0 ufrag SYZJ network-id 1 network-cost 10\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('15', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:3483861722 1 tcp 1518149375 10.22.85.193 9 typ host tcptype active generation 0 ufrag SYZJ network-id 3 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('16', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:2036339923 1 tcp 1518083839 10.125.47.95 9 typ host tcptype active generation 0 ufrag SYZJ network-id 4 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('17', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:2036339923 1 tcp 1518083839 10.125.47.95 9 typ host tcptype active generation 0 ufrag SYZJ network-id 4 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('18', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:4214855034 1 tcp 1518280447 10.84.8.204 9 typ host tcptype active generation 0 ufrag SYZJ network-id 1 network-cost 10\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('19', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:3101734672 1 tcp 1518214911 100.20.163.176 9 typ host tcptype active generation 0 ufrag SYZJ network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('20', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:1164522311 1 udp 1686052607 154.159.237.193 15332 typ srflx raddr 10.84.8.204 rport 59633 generation 0 ufrag SYZJ network-id 1 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('21', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:3498181981 1 udp 1685987071 154.159.237.193 16689 typ srflx raddr 100.20.163.176 rport 41799 generation 0 ufrag SYZJ network-id 2 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('22', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:3483861722 1 tcp 1518149375 10.22.85.193 9 typ host tcptype active generation 0 ufrag SYZJ network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('23', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:3101734672 1 tcp 1518214911 100.20.163.176 9 typ host tcptype active generation 0 ufrag SYZJ network-id 2 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('24', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:679485817 1 udp 1685855999 154.159.237.193 15346 typ srflx raddr 10.125.47.95 rport 50215 generation 0 ufrag SYZJ network-id 4 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('25', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:3498181981 1 udp 1685987071 154.159.237.193 15367 typ srflx raddr 100.20.163.176 rport 43048 generation 0 ufrag SYZJ network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('26', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:2655500144 1 udp 1685921535 154.159.237.193 15424 typ srflx raddr 10.22.85.193 rport 46841 generation 0 ufrag SYZJ network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('27', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:1164522311 1 udp 1686052607 154.159.237.193 16488 typ srflx raddr 10.84.8.204 rport 54674 generation 0 ufrag SYZJ network-id 1 network-cost 10\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('28', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:2655500144 1 udp 1685921535 154.159.237.193 16489 typ srflx raddr 10.22.85.193 rport 43025 generation 0 ufrag SYZJ network-id 3 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('29', '2', '2', '4', 'candidate', '{\"candidate\":\"candidate:679485817 1 udp 1685855999 154.159.237.193 22716 typ srflx raddr 10.125.47.95 rport 50663 generation 0 ufrag SYZJ network-id 4 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"SYZJ\"}', '2026-07-22 08:22:55'),
('30', '2', '4', '2', 'answer', '{\"sdp\":\"v=0\\r\\no=- 6366022182078866499 2 IN IP4 127.0.0.1\\r\\ns=-\\r\\nt=0 0\\r\\na=group:BUNDLE 0 1\\r\\na=extmap-allow-mixed\\r\\na=msid-semantic: WMS 52ea3c80-8285-42b9-b465-5a7ef5879b6c\\r\\nm=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126\\r\\nc=IN IP4 0.0.0.0\\r\\na=rtcp:9 IN IP4 0.0.0.0\\r\\na=ice-ufrag:qzKZ\\r\\na=ice-pwd:9RBJ6I18Cxs0KI0VotFHSTxI\\r\\na=ice-options:trickle\\r\\na=fingerprint:sha-256 50:A7:14:AB:B2:C2:54:9C:76:17:D8:D3:B0:53:6D:70:78:F1:AD:B1:A9:29:A2:1C:9A:B8:54:48:18:16:76:DA\\r\\na=setup:active\\r\\na=mid:0\\r\\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\\r\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\r\\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\\r\\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\\r\\na=sendrecv\\r\\na=msid:52ea3c80-8285-42b9-b465-5a7ef5879b6c 1e65d5ec-a060-4407-93a6-9b1326097bfb\\r\\na=rtcp-mux\\r\\na=rtcp-rsize\\r\\na=rtpmap:111 opus/48000/2\\r\\na=rtcp-fb:111 transport-cc\\r\\na=fmtp:111 minptime=10;useinbandfec=1\\r\\na=rtpmap:63 red/48000/2\\r\\na=fmtp:63 111/111\\r\\na=rtpmap:9 G722/8000\\r\\na=rtpmap:0 PCMU/8000\\r\\na=rtpmap:8 PCMA/8000\\r\\na=rtpmap:13 CN/8000\\r\\na=rtpmap:110 telephone-event/48000\\r\\na=rtpmap:126 telephone-event/8000\\r\\na=ssrc:2236881067 cname:EGQtGCO1UDhjN7+C\\r\\nm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 119 120 109 114 115 116 123 124 125\\r\\nc=IN IP4 0.0.0.0\\r\\na=rtcp:9 IN IP4 0.0.0.0\\r\\na=ice-ufrag:qzKZ\\r\\na=ice-pwd:9RBJ6I18Cxs0KI0VotFHSTxI\\r\\na=ice-options:trickle\\r\\na=fingerprint:sha-256 50:A7:14:AB:B2:C2:54:9C:76:17:D8:D3:B0:53:6D:70:78:F1:AD:B1:A9:29:A2:1C:9A:B8:54:48:18:16:76:DA\\r\\na=setup:active\\r\\na=mid:1\\r\\na=extmap:14 urn:ietf:params:rtp-hdrext:toffset\\r\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\r\\na=extmap:13 urn:3gpp:video-orientation\\r\\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\\r\\na=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\\r\\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\\r\\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\\r\\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\\r\\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\\r\\na=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\\r\\na=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\\r\\na=sendrecv\\r\\na=msid:52ea3c80-8285-42b9-b465-5a7ef5879b6c 2f999a03-9968-40fa-a761-3ad045c456ee\\r\\na=rtcp-mux\\r\\na=rtcp-rsize\\r\\na=rtpmap:96 VP8/90000\\r\\na=rtcp-fb:96 goog-remb\\r\\na=rtcp-fb:96 transport-cc\\r\\na=rtcp-fb:96 ccm fir\\r\\na=rtcp-fb:96 nack\\r\\na=rtcp-fb:96 nack pli\\r\\na=rtpmap:97 rtx/90000\\r\\na=fmtp:97 apt=96\\r\\na=rtpmap:98 VP9/90000\\r\\na=rtcp-fb:98 goog-remb\\r\\na=rtcp-fb:98 transport-cc\\r\\na=rtcp-fb:98 ccm fir\\r\\na=rtcp-fb:98 nack\\r\\na=rtcp-fb:98 nack pli\\r\\na=fmtp:98 profile-id=0\\r\\na=rtpmap:99 rtx/90000\\r\\na=fmtp:99 apt=98\\r\\na=rtpmap:119 H264/90000\\r\\na=rtcp-fb:119 goog-remb\\r\\na=rtcp-fb:119 transport-cc\\r\\na=rtcp-fb:119 ccm fir\\r\\na=rtcp-fb:119 nack\\r\\na=rtcp-fb:119 nack pli\\r\\na=fmtp:119 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\\r\\na=rtpmap:120 rtx/90000\\r\\na=fmtp:120 apt=119\\r\\na=rtpmap:109 H264/90000\\r\\na=rtcp-fb:109 goog-remb\\r\\na=rtcp-fb:109 transport-cc\\r\\na=rtcp-fb:109 ccm fir\\r\\na=rtcp-fb:109 nack\\r\\na=rtcp-fb:109 nack pli\\r\\na=fmtp:109 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f\\r\\na=rtpmap:114 rtx/90000\\r\\na=fmtp:114 apt=109\\r\\na=rtpmap:115 H264/90000\\r\\na=rtcp-fb:115 goog-remb\\r\\na=rtcp-fb:115 transport-cc\\r\\na=rtcp-fb:115 ccm fir\\r\\na=rtcp-fb:115 nack\\r\\na=rtcp-fb:115 nack pli\\r\\na=fmtp:115 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f\\r\\na=rtpmap:116 rtx/90000\\r\\na=fmtp:116 apt=115\\r\\na=rtpmap:123 red/90000\\r\\na=rtpmap:124 rtx/90000\\r\\na=fmtp:124 apt=123\\r\\na=rtpmap:125 ulpfec/90000\\r\\na=ssrc-group:FID 465062542 213690654\\r\\na=ssrc:465062542 cname:EGQtGCO1UDhjN7+C\\r\\na=ssrc:213690654 cname:EGQtGCO1UDhjN7+C\\r\\n\",\"type\":\"answer\"}', '2026-07-22 08:23:14'),
('31', '2', '4', '2', 'candidate', '{\"candidate\":\"candidate:3560946386 1 udp 1677729535 154.159.237.193 14257 typ srflx raddr 10.84.8.40 rport 36496 generation 0 ufrag qzKZ network-cost 999\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"qzKZ\"}', '2026-07-22 08:23:14'),
('32', '2', '4', '2', 'candidate', '{\"candidate\":\"candidate:1492992856 1 udp 2113937151 10.84.8.40 36496 typ host generation 0 ufrag qzKZ network-cost 999\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"qzKZ\"}', '2026-07-22 08:23:14'),
('33', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:3985816791 1 udp 2122129151 10.22.85.193 41456 typ host generation 0 ufrag XPUb network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:34'),
('34', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:492626110 1 udp 2122260223 10.84.8.204 56805 typ host generation 0 ufrag XPUb network-id 1 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:34'),
('35', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:2912411862 1 udp 2122194687 100.20.163.176 49068 typ host generation 0 ufrag XPUb network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:34'),
('36', '3', '2', '4', 'offer', '{\"sdp\":\"v=0\\r\\no=- 4591005060579485348 2 IN IP4 127.0.0.1\\r\\ns=-\\r\\nt=0 0\\r\\na=group:BUNDLE 0 1\\r\\na=extmap-allow-mixed\\r\\na=msid-semantic: WMS e64dd7f9-a8a6-418a-995c-cbf0e11d690d\\r\\nm=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126\\r\\nc=IN IP4 0.0.0.0\\r\\na=rtcp:9 IN IP4 0.0.0.0\\r\\na=ice-ufrag:XPUb\\r\\na=ice-pwd:fKlhvIgPXSe1EcYHJgpyg8UD\\r\\na=ice-options:trickle\\r\\na=fingerprint:sha-256 C3:5B:1C:A7:ED:01:7F:AE:9E:04:80:5F:A8:CA:7A:12:26:3E:BD:09:50:8E:E2:DA:25:6F:90:B2:E0:4F:FD:71\\r\\na=setup:actpass\\r\\na=mid:0\\r\\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\\r\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\r\\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\\r\\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\\r\\na=sendrecv\\r\\na=msid:e64dd7f9-a8a6-418a-995c-cbf0e11d690d e9a97065-cc86-407c-8a5d-b9150313cb78\\r\\na=rtcp-mux\\r\\na=rtcp-rsize\\r\\na=rtpmap:111 opus/48000/2\\r\\na=rtcp-fb:111 transport-cc\\r\\na=fmtp:111 minptime=10;useinbandfec=1\\r\\na=rtpmap:63 red/48000/2\\r\\na=fmtp:63 111/111\\r\\na=rtpmap:9 G722/8000\\r\\na=rtpmap:0 PCMU/8000\\r\\na=rtpmap:8 PCMA/8000\\r\\na=rtpmap:13 CN/8000\\r\\na=rtpmap:110 telephone-event/48000\\r\\na=rtpmap:126 telephone-event/8000\\r\\na=ssrc:2425203279 cname:9pHwFNxZ5/p+HE/v\\r\\na=ssrc:2425203279 msid:e64dd7f9-a8a6-418a-995c-cbf0e11d690d e9a97065-cc86-407c-8a5d-b9150313cb78\\r\\nm=video 9 UDP/TLS/RTP/SAVPF 96 97 39 40 98 99 103 104 119 120 109 114 115 116 45 46 123 124 125\\r\\nc=IN IP4 0.0.0.0\\r\\na=rtcp:9 IN IP4 0.0.0.0\\r\\na=ice-ufrag:XPUb\\r\\na=ice-pwd:fKlhvIgPXSe1EcYHJgpyg8UD\\r\\na=ice-options:trickle\\r\\na=fingerprint:sha-256 C3:5B:1C:A7:ED:01:7F:AE:9E:04:80:5F:A8:CA:7A:12:26:3E:BD:09:50:8E:E2:DA:25:6F:90:B2:E0:4F:FD:71\\r\\na=setup:actpass\\r\\na=mid:1\\r\\na=extmap:14 urn:ietf:params:rtp-hdrext:toffset\\r\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\r\\na=extmap:13 urn:3gpp:video-orientation\\r\\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\\r\\na=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\\r\\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\\r\\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\\r\\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\\r\\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\\r\\na=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\\r\\na=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\\r\\na=sendrecv\\r\\na=msid:e64dd7f9-a8a6-418a-995c-cbf0e11d690d a0325e4d-601f-4fbf-9475-7aa7190be4e1\\r\\na=rtcp-mux\\r\\na=rtcp-rsize\\r\\na=rtpmap:96 VP8/90000\\r\\na=rtcp-fb:96 goog-remb\\r\\na=rtcp-fb:96 transport-cc\\r\\na=rtcp-fb:96 ccm fir\\r\\na=rtcp-fb:96 nack\\r\\na=rtcp-fb:96 nack pli\\r\\na=rtpmap:97 rtx/90000\\r\\na=fmtp:97 apt=96\\r\\na=rtpmap:39 AV1/90000\\r\\na=rtcp-fb:39 goog-remb\\r\\na=rtcp-fb:39 transport-cc\\r\\na=rtcp-fb:39 ccm fir\\r\\na=rtcp-fb:39 nack\\r\\na=rtcp-fb:39 nack pli\\r\\na=fmtp:39 level-idx=5;profile=0;tier=0\\r\\na=rtpmap:40 rtx/90000\\r\\na=fmtp:40 apt=39\\r\\na=rtpmap:98 VP9/90000\\r\\na=rtcp-fb:98 goog-remb\\r\\na=rtcp-fb:98 transport-cc\\r\\na=rtcp-fb:98 ccm fir\\r\\na=rtcp-fb:98 nack\\r\\na=rtcp-fb:98 nack pli\\r\\na=fmtp:98 profile-id=0\\r\\na=rtpmap:99 rtx/90000\\r\\na=fmtp:99 apt=98\\r\\na=rtpmap:103 H264/90000\\r\\na=rtcp-fb:103 goog-remb\\r\\na=rtcp-fb:103 transport-cc\\r\\na=rtcp-fb:103 ccm fir\\r\\na=rtcp-fb:103 nack\\r\\na=rtcp-fb:103 nack pli\\r\\na=fmtp:103 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\\r\\na=rtpmap:104 rtx/90000\\r\\na=fmtp:104 apt=103\\r\\na=rtpmap:119 H264/90000\\r\\na=rtcp-fb:119 goog-remb\\r\\na=rtcp-fb:119 transport-cc\\r\\na=rtcp-fb:119 ccm fir\\r\\na=rtcp-fb:119 nack\\r\\na=rtcp-fb:119 nack pli\\r\\na=fmtp:119 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\\r\\na=rtpmap:120 rtx/90000\\r\\na=fmtp:120 apt=119\\r\\na=rtpmap:109 H264/90000\\r\\na=rtcp-fb:109 goog-remb\\r\\na=rtcp-fb:109 transport-cc\\r\\na=rtcp-fb:109 ccm fir\\r\\na=rtcp-fb:109 nack\\r\\na=rtcp-fb:109 nack pli\\r\\na=fmtp:109 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f\\r\\na=rtpmap:114 rtx/90000\\r\\na=fmtp:114 apt=109\\r\\na=rtpmap:115 H264/90000\\r\\na=rtcp-fb:115 goog-remb\\r\\na=rtcp-fb:115 transport-cc\\r\\na=rtcp-fb:115 ccm fir\\r\\na=rtcp-fb:115 nack\\r\\na=rtcp-fb:115 nack pli\\r\\na=fmtp:115 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f\\r\\na=rtpmap:116 rtx/90000\\r\\na=fmtp:116 apt=115\\r\\na=rtpmap:45 H265/90000\\r\\na=rtcp-fb:45 goog-remb\\r\\na=rtcp-fb:45 transport-cc\\r\\na=rtcp-fb:45 ccm fir\\r\\na=rtcp-fb:45 nack\\r\\na=rtcp-fb:45 nack pli\\r\\na=fmtp:45 level-id=90;profile-id=1;tier-flag=0;tx-mode=SRST\\r\\na=rtpmap:46 rtx/90000\\r\\na=fmtp:46 apt=45\\r\\na=rtpmap:123 red/90000\\r\\na=rtpmap:124 rtx/90000\\r\\na=fmtp:124 apt=123\\r\\na=rtpmap:125 ulpfec/90000\\r\\na=ssrc-group:FID 3015243700 4085048250\\r\\na=ssrc:3015243700 cname:9pHwFNxZ5/p+HE/v\\r\\na=ssrc:3015243700 msid:e64dd7f9-a8a6-418a-995c-cbf0e11d690d a0325e4d-601f-4fbf-9475-7aa7190be4e1\\r\\na=ssrc:4085048250 cname:9pHwFNxZ5/p+HE/v\\r\\na=ssrc:4085048250 msid:e64dd7f9-a8a6-418a-995c-cbf0e11d690d a0325e4d-601f-4fbf-9475-7aa7190be4e1\\r\\n\",\"type\":\"offer\"}', '2026-07-22 08:25:34'),
('37', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:2912411862 1 udp 2122194687 100.20.163.176 47922 typ host generation 0 ufrag XPUb network-id 2 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('38', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:941961044 1 udp 1686052607 154.159.237.193 18862 typ srflx raddr 10.84.8.204 rport 56805 generation 0 ufrag XPUb network-id 1 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('39', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:1277790440 1 udp 2122063615 10.125.47.95 35084 typ host generation 0 ufrag XPUb network-id 4 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('40', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:3985816791 1 udp 2122129151 10.22.85.193 52551 typ host generation 0 ufrag XPUb network-id 3 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('41', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:2909326974 1 udp 1685921535 154.159.237.193 20181 typ srflx raddr 10.22.85.193 rport 52551 generation 0 ufrag XPUb network-id 3 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('42', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:1670578726 1 tcp 1518280447 10.84.8.204 9 typ host tcptype active generation 0 ufrag XPUb network-id 1 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('43', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:215218753 1 udp 1685855999 154.159.237.193 20571 typ srflx raddr 10.125.47.95 rport 35084 generation 0 ufrag XPUb network-id 4 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('44', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:853961328 1 tcp 1518083839 10.125.47.95 9 typ host tcptype active generation 0 ufrag XPUb network-id 4 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('45', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:1670578726 1 tcp 1518280447 10.84.8.204 9 typ host tcptype active generation 0 ufrag XPUb network-id 1 network-cost 10\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('46', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:1817819036 1 udp 1685987071 154.159.237.193 20700 typ srflx raddr 100.20.163.176 rport 49068 generation 0 ufrag XPUb network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('47', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:3545760334 1 tcp 1518214911 100.20.163.176 9 typ host tcptype active generation 0 ufrag XPUb network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('48', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:2909326974 1 udp 1685921535 154.159.237.193 19907 typ srflx raddr 10.22.85.193 rport 41456 generation 0 ufrag XPUb network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('49', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:215218753 1 udp 1685855999 154.159.237.193 19354 typ srflx raddr 10.125.47.95 rport 55266 generation 0 ufrag XPUb network-id 4 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('50', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:941961044 1 udp 1686052607 154.159.237.193 20085 typ srflx raddr 10.84.8.204 rport 34695 generation 0 ufrag XPUb network-id 1 network-cost 10\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('51', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:1277790440 1 udp 2122063615 10.125.47.95 55266 typ host generation 0 ufrag XPUb network-id 4 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('52', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:853961328 1 tcp 1518083839 10.125.47.95 9 typ host tcptype active generation 0 ufrag XPUb network-id 4 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('53', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:492626110 1 udp 2122260223 10.84.8.204 34695 typ host generation 0 ufrag XPUb network-id 1 network-cost 10\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('54', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:2472369743 1 tcp 1518149375 10.22.85.193 9 typ host tcptype active generation 0 ufrag XPUb network-id 3 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('55', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:3545760334 1 tcp 1518214911 100.20.163.176 9 typ host tcptype active generation 0 ufrag XPUb network-id 2 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('56', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:2472369743 1 tcp 1518149375 10.22.85.193 9 typ host tcptype active generation 0 ufrag XPUb network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('57', '3', '2', '4', 'candidate', '{\"candidate\":\"candidate:1817819036 1 udp 1685987071 154.159.237.193 20265 typ srflx raddr 100.20.163.176 rport 47922 generation 0 ufrag XPUb network-id 2 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"XPUb\"}', '2026-07-22 08:25:35'),
('58', '3', '4', '2', 'answer', '{\"sdp\":\"v=0\\r\\no=- 2763984400419308823 2 IN IP4 127.0.0.1\\r\\ns=-\\r\\nt=0 0\\r\\na=group:BUNDLE 0 1\\r\\na=extmap-allow-mixed\\r\\na=msid-semantic: WMS ca7022b3-8bbd-4967-ae79-a62c14e155c8\\r\\nm=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126\\r\\nc=IN IP4 0.0.0.0\\r\\na=rtcp:9 IN IP4 0.0.0.0\\r\\na=ice-ufrag:JHo+\\r\\na=ice-pwd:hKUBU+ebwG0QjXm4yrVAOh/r\\r\\na=ice-options:trickle\\r\\na=fingerprint:sha-256 FF:B5:80:13:C9:32:59:F0:B7:70:26:3A:4E:3A:B7:B0:11:DC:E3:F8:DC:40:AB:44:D7:07:14:6C:67:58:56:58\\r\\na=setup:active\\r\\na=mid:0\\r\\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\\r\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\r\\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\\r\\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\\r\\na=sendrecv\\r\\na=msid:ca7022b3-8bbd-4967-ae79-a62c14e155c8 6e4e6eaf-07eb-4deb-9e0e-86cd387e39e7\\r\\na=rtcp-mux\\r\\na=rtcp-rsize\\r\\na=rtpmap:111 opus/48000/2\\r\\na=rtcp-fb:111 transport-cc\\r\\na=fmtp:111 minptime=10;useinbandfec=1\\r\\na=rtpmap:63 red/48000/2\\r\\na=fmtp:63 111/111\\r\\na=rtpmap:9 G722/8000\\r\\na=rtpmap:0 PCMU/8000\\r\\na=rtpmap:8 PCMA/8000\\r\\na=rtpmap:13 CN/8000\\r\\na=rtpmap:110 telephone-event/48000\\r\\na=rtpmap:126 telephone-event/8000\\r\\na=ssrc:3676949212 cname:NyZR3Ckzc4bacG/J\\r\\nm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 119 120 109 114 115 116 123 124 125\\r\\nc=IN IP4 0.0.0.0\\r\\na=rtcp:9 IN IP4 0.0.0.0\\r\\na=ice-ufrag:JHo+\\r\\na=ice-pwd:hKUBU+ebwG0QjXm4yrVAOh/r\\r\\na=ice-options:trickle\\r\\na=fingerprint:sha-256 FF:B5:80:13:C9:32:59:F0:B7:70:26:3A:4E:3A:B7:B0:11:DC:E3:F8:DC:40:AB:44:D7:07:14:6C:67:58:56:58\\r\\na=setup:active\\r\\na=mid:1\\r\\na=extmap:14 urn:ietf:params:rtp-hdrext:toffset\\r\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\r\\na=extmap:13 urn:3gpp:video-orientation\\r\\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\\r\\na=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\\r\\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\\r\\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\\r\\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\\r\\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\\r\\na=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\\r\\na=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\\r\\na=sendrecv\\r\\na=msid:ca7022b3-8bbd-4967-ae79-a62c14e155c8 f67ca6fa-15dc-446e-8125-d74a0f5f8291\\r\\na=rtcp-mux\\r\\na=rtcp-rsize\\r\\na=rtpmap:96 VP8/90000\\r\\na=rtcp-fb:96 goog-remb\\r\\na=rtcp-fb:96 transport-cc\\r\\na=rtcp-fb:96 ccm fir\\r\\na=rtcp-fb:96 nack\\r\\na=rtcp-fb:96 nack pli\\r\\na=rtpmap:97 rtx/90000\\r\\na=fmtp:97 apt=96\\r\\na=rtpmap:98 VP9/90000\\r\\na=rtcp-fb:98 goog-remb\\r\\na=rtcp-fb:98 transport-cc\\r\\na=rtcp-fb:98 ccm fir\\r\\na=rtcp-fb:98 nack\\r\\na=rtcp-fb:98 nack pli\\r\\na=fmtp:98 profile-id=0\\r\\na=rtpmap:99 rtx/90000\\r\\na=fmtp:99 apt=98\\r\\na=rtpmap:119 H264/90000\\r\\na=rtcp-fb:119 goog-remb\\r\\na=rtcp-fb:119 transport-cc\\r\\na=rtcp-fb:119 ccm fir\\r\\na=rtcp-fb:119 nack\\r\\na=rtcp-fb:119 nack pli\\r\\na=fmtp:119 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\\r\\na=rtpmap:120 rtx/90000\\r\\na=fmtp:120 apt=119\\r\\na=rtpmap:109 H264/90000\\r\\na=rtcp-fb:109 goog-remb\\r\\na=rtcp-fb:109 transport-cc\\r\\na=rtcp-fb:109 ccm fir\\r\\na=rtcp-fb:109 nack\\r\\na=rtcp-fb:109 nack pli\\r\\na=fmtp:109 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f\\r\\na=rtpmap:114 rtx/90000\\r\\na=fmtp:114 apt=109\\r\\na=rtpmap:115 H264/90000\\r\\na=rtcp-fb:115 goog-remb\\r\\na=rtcp-fb:115 transport-cc\\r\\na=rtcp-fb:115 ccm fir\\r\\na=rtcp-fb:115 nack\\r\\na=rtcp-fb:115 nack pli\\r\\na=fmtp:115 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f\\r\\na=rtpmap:116 rtx/90000\\r\\na=fmtp:116 apt=115\\r\\na=rtpmap:123 red/90000\\r\\na=rtpmap:124 rtx/90000\\r\\na=fmtp:124 apt=123\\r\\na=rtpmap:125 ulpfec/90000\\r\\na=ssrc-group:FID 2915965498 1996672851\\r\\na=ssrc:2915965498 cname:NyZR3Ckzc4bacG/J\\r\\na=ssrc:1996672851 cname:NyZR3Ckzc4bacG/J\\r\\n\",\"type\":\"answer\"}', '2026-07-22 08:25:40'),
('59', '3', '4', '2', 'candidate', '{\"candidate\":\"candidate:359227280 1 udp 2122194687 10.84.8.40 39727 typ host generation 0 ufrag JHo+ network-id 2 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"JHo+\"}', '2026-07-22 08:25:40'),
('60', '3', '4', '2', 'candidate', '{\"candidate\":\"candidate:2658810565 1 udp 2122260223 100.1.29.124 47191 typ host generation 0 ufrag JHo+ network-id 1 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"JHo+\"}', '2026-07-22 08:25:40'),
('61', '3', '4', '2', 'candidate', '{\"candidate\":\"candidate:806391930 1 udp 1685987071 154.159.237.193 10195 typ srflx raddr 10.84.8.40 rport 39727 generation 0 ufrag JHo+ network-id 2 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"JHo+\"}', '2026-07-22 08:25:40'),
('62', '3', '2', '4', 'hangup', '{\"reason\":\"user_hangup\"}', '2026-07-22 08:25:57'),
('63', '4', '2', '4', 'candidate', '{\"candidate\":\"candidate:519249597 1 udp 2122260223 10.84.8.204 49007 typ host generation 0 ufrag 0h8C network-id 1 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"0h8C\"}', '2026-07-22 08:27:17'),
('64', '4', '2', '4', 'offer', '{\"sdp\":\"v=0\\r\\no=- 604612474319551645 2 IN IP4 127.0.0.1\\r\\ns=-\\r\\nt=0 0\\r\\na=group:BUNDLE 0\\r\\na=extmap-allow-mixed\\r\\na=msid-semantic: WMS 0a5a94ae-ae07-4e49-b46e-dd3173dc8191\\r\\nm=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126\\r\\nc=IN IP4 0.0.0.0\\r\\na=rtcp:9 IN IP4 0.0.0.0\\r\\na=ice-ufrag:0h8C\\r\\na=ice-pwd:Km4poiwgx1u0KLK9X/gzXD8e\\r\\na=ice-options:trickle\\r\\na=fingerprint:sha-256 9F:A3:83:C6:CA:94:9C:FD:7F:5F:24:F2:65:2D:3A:44:BB:2A:D6:3F:0F:6B:69:11:2C:67:BD:56:56:AF:95:87\\r\\na=setup:actpass\\r\\na=mid:0\\r\\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\\r\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\r\\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\\r\\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\\r\\na=sendrecv\\r\\na=msid:0a5a94ae-ae07-4e49-b46e-dd3173dc8191 236513c9-ab88-4485-a17e-20be57614122\\r\\na=rtcp-mux\\r\\na=rtcp-rsize\\r\\na=rtpmap:111 opus/48000/2\\r\\na=rtcp-fb:111 transport-cc\\r\\na=fmtp:111 minptime=10;useinbandfec=1\\r\\na=rtpmap:63 red/48000/2\\r\\na=fmtp:63 111/111\\r\\na=rtpmap:9 G722/8000\\r\\na=rtpmap:0 PCMU/8000\\r\\na=rtpmap:8 PCMA/8000\\r\\na=rtpmap:13 CN/8000\\r\\na=rtpmap:110 telephone-event/48000\\r\\na=rtpmap:126 telephone-event/8000\\r\\na=ssrc:1337094719 cname:R6UN1L8p6gEwn0uK\\r\\na=ssrc:1337094719 msid:0a5a94ae-ae07-4e49-b46e-dd3173dc8191 236513c9-ab88-4485-a17e-20be57614122\\r\\n\",\"type\":\"offer\"}', '2026-07-22 08:27:17'),
('65', '4', '2', '4', 'candidate', '{\"candidate\":\"candidate:2922913493 1 udp 2122194687 100.20.163.176 35011 typ host generation 0 ufrag 0h8C network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"0h8C\"}', '2026-07-22 08:27:17'),
('66', '4', '2', '4', 'candidate', '{\"candidate\":\"candidate:3996992212 1 udp 2122129151 10.22.85.193 42412 typ host generation 0 ufrag 0h8C network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"0h8C\"}', '2026-07-22 08:27:17'),
('67', '4', '2', '4', 'candidate', '{\"candidate\":\"candidate:1334212331 1 udp 2122063615 10.125.47.95 55827 typ host generation 0 ufrag 0h8C network-id 4 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"0h8C\"}', '2026-07-22 08:27:17'),
('68', '4', '2', '4', 'candidate', '{\"candidate\":\"candidate:259785794 1 udp 1685855999 154.159.237.193 33368 typ srflx raddr 10.125.47.95 rport 55827 generation 0 ufrag 0h8C network-id 4 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"0h8C\"}', '2026-07-22 08:27:18'),
('69', '4', '2', '4', 'candidate', '{\"candidate\":\"candidate:1878411679 1 udp 1685987071 154.159.237.193 33362 typ srflx raddr 100.20.163.176 rport 35011 generation 0 ufrag 0h8C network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"0h8C\"}', '2026-07-22 08:27:18'),
('70', '4', '2', '4', 'candidate', '{\"candidate\":\"candidate:3505912909 1 tcp 1518214911 100.20.163.176 9 typ host tcptype active generation 0 ufrag 0h8C network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"0h8C\"}', '2026-07-22 08:27:18'),
('71', '4', '2', '4', 'candidate', '{\"candidate\":\"candidate:826905715 1 tcp 1518083839 10.125.47.95 9 typ host tcptype active generation 0 ufrag 0h8C network-id 4 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"0h8C\"}', '2026-07-22 08:27:18'),
('72', '4', '2', '4', 'candidate', '{\"candidate\":\"candidate:1614609445 1 tcp 1518280447 10.84.8.204 9 typ host tcptype active generation 0 ufrag 0h8C network-id 1 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"0h8C\"}', '2026-07-22 08:27:18'),
('73', '4', '2', '4', 'candidate', '{\"candidate\":\"candidate:2932289661 1 udp 1685921535 154.159.237.193 33360 typ srflx raddr 10.22.85.193 rport 42412 generation 0 ufrag 0h8C network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"0h8C\"}', '2026-07-22 08:27:18'),
('74', '4', '2', '4', 'candidate', '{\"candidate\":\"candidate:998953303 1 udp 1686052607 154.159.237.193 33361 typ srflx raddr 10.84.8.204 rport 49007 generation 0 ufrag 0h8C network-id 1 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"0h8C\"}', '2026-07-22 08:27:18'),
('75', '4', '2', '4', 'candidate', '{\"candidate\":\"candidate:2431819852 1 tcp 1518149375 10.22.85.193 9 typ host tcptype active generation 0 ufrag 0h8C network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"0h8C\"}', '2026-07-22 08:27:18'),
('76', '4', '2', '4', 'hangup', '{\"reason\":\"user_hangup\"}', '2026-07-22 08:27:50'),
('77', '4', '2', '4', 'hangup', '{\"reason\":\"user_hangup\"}', '2026-07-22 08:27:50'),
('78', '4', '2', '4', 'hangup', '{\"reason\":\"user_hangup\"}', '2026-07-22 08:28:06'),
('79', '5', '4', '2', 'offer', '{\"sdp\":\"v=0\\r\\no=- 8362435085201674057 2 IN IP4 127.0.0.1\\r\\ns=-\\r\\nt=0 0\\r\\na=group:BUNDLE 0\\r\\na=extmap-allow-mixed\\r\\na=msid-semantic: WMS a28c5901-14d0-487d-9ae7-e8ef062db1fd\\r\\nm=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126\\r\\nc=IN IP4 0.0.0.0\\r\\na=rtcp:9 IN IP4 0.0.0.0\\r\\na=ice-ufrag:WsTS\\r\\na=ice-pwd:r7kKCW01r5C8VJeUBY8QCNc6\\r\\na=ice-options:trickle\\r\\na=fingerprint:sha-256 38:BC:84:9A:B6:D8:8B:51:84:22:55:CC:D3:6F:10:4B:B6:AA:18:8F:FE:42:9E:A8:7E:39:4E:C2:12:DA:E1:B7\\r\\na=setup:actpass\\r\\na=mid:0\\r\\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\\r\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\r\\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\\r\\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\\r\\na=sendrecv\\r\\na=msid:a28c5901-14d0-487d-9ae7-e8ef062db1fd 22c91355-ef49-4b32-8cce-0ae9208fe0ee\\r\\na=rtcp-mux\\r\\na=rtcp-rsize\\r\\na=rtpmap:111 opus/48000/2\\r\\na=rtcp-fb:111 transport-cc\\r\\na=fmtp:111 minptime=10;useinbandfec=1\\r\\na=rtpmap:63 red/48000/2\\r\\na=fmtp:63 111/111\\r\\na=rtpmap:9 G722/8000\\r\\na=rtpmap:0 PCMU/8000\\r\\na=rtpmap:8 PCMA/8000\\r\\na=rtpmap:13 CN/8000\\r\\na=rtpmap:110 telephone-event/48000\\r\\na=rtpmap:126 telephone-event/8000\\r\\na=ssrc:535862074 cname:7G6YjhoVSE2rvPnu\\r\\na=ssrc:535862074 msid:a28c5901-14d0-487d-9ae7-e8ef062db1fd 22c91355-ef49-4b32-8cce-0ae9208fe0ee\\r\\n\",\"type\":\"offer\"}', '2026-07-22 08:28:09'),
('80', '5', '4', '2', 'candidate', '{\"candidate\":\"candidate:4087560116 1 udp 2122194687 10.84.8.40 45561 typ host generation 0 ufrag WsTS network-id 2 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"WsTS\"}', '2026-07-22 08:28:10'),
('81', '5', '4', '2', 'candidate', '{\"candidate\":\"candidate:3854466310 1 udp 1685987071 154.159.237.193 4706 typ srflx raddr 10.84.8.40 rport 45561 generation 0 ufrag WsTS network-id 2 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"WsTS\"}', '2026-07-22 08:28:10'),
('82', '5', '4', '2', 'candidate', '{\"candidate\":\"candidate:1585350894 1 udp 2122260223 100.1.29.124 53328 typ host generation 0 ufrag WsTS network-id 1 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"WsTS\"}', '2026-07-22 08:28:10'),
('83', '5', '4', '2', 'candidate', '{\"candidate\":\"candidate:2372719916 1 tcp 1518214911 10.84.8.40 9 typ host tcptype active generation 0 ufrag WsTS network-id 2 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"WsTS\"}', '2026-07-22 08:28:10'),
('84', '5', '4', '2', 'candidate', '{\"candidate\":\"candidate:548498038 1 tcp 1518280447 100.1.29.124 9 typ host tcptype active generation 0 ufrag WsTS network-id 1 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"WsTS\"}', '2026-07-22 08:28:10'),
('85', '5', '2', '4', 'answer', '{\"sdp\":\"v=0\\r\\no=- 4539709928027973170 2 IN IP4 127.0.0.1\\r\\ns=-\\r\\nt=0 0\\r\\na=group:BUNDLE 0\\r\\na=extmap-allow-mixed\\r\\na=msid-semantic: WMS d0a53c74-a278-4d10-9b5d-b0509fbf7f70\\r\\nm=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126\\r\\nc=IN IP4 0.0.0.0\\r\\na=rtcp:9 IN IP4 0.0.0.0\\r\\na=ice-ufrag:6kP1\\r\\na=ice-pwd:ac+L7BYoT1alLSSjRRY3dt+v\\r\\na=ice-options:trickle\\r\\na=fingerprint:sha-256 97:DA:67:28:98:D6:8D:64:D5:92:55:05:26:F6:DF:14:18:42:46:19:01:91:16:A4:32:13:D1:43:03:6E:97:C0\\r\\na=setup:active\\r\\na=mid:0\\r\\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\\r\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\r\\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\\r\\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\\r\\na=sendrecv\\r\\na=msid:d0a53c74-a278-4d10-9b5d-b0509fbf7f70 02d7d4f1-2903-479c-8a80-4fd2d4905c21\\r\\na=rtcp-mux\\r\\na=rtcp-rsize\\r\\na=rtpmap:111 opus/48000/2\\r\\na=rtcp-fb:111 transport-cc\\r\\na=fmtp:111 minptime=10;useinbandfec=1\\r\\na=rtpmap:63 red/48000/2\\r\\na=fmtp:63 111/111\\r\\na=rtpmap:9 G722/8000\\r\\na=rtpmap:0 PCMU/8000\\r\\na=rtpmap:8 PCMA/8000\\r\\na=rtpmap:13 CN/8000\\r\\na=rtpmap:110 telephone-event/48000\\r\\na=rtpmap:126 telephone-event/8000\\r\\na=ssrc:1298067889 cname:3x+W+fuvP+qx8dGb\\r\\n\",\"type\":\"answer\"}', '2026-07-22 08:28:18'),
('86', '5', '2', '4', 'candidate', '{\"candidate\":\"candidate:3473868303 1 udp 2122194687 100.20.163.176 43402 typ host generation 0 ufrag 6kP1 network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6kP1\"}', '2026-07-22 08:28:18'),
('87', '5', '2', '4', 'candidate', '{\"candidate\":\"candidate:783380017 1 udp 2122063615 10.125.47.95 50152 typ host generation 0 ufrag 6kP1 network-id 4 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6kP1\"}', '2026-07-22 08:28:18'),
('88', '5', '2', '4', 'candidate', '{\"candidate\":\"candidate:2399820302 1 udp 2122129151 10.22.85.193 35367 typ host generation 0 ufrag 6kP1 network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6kP1\"}', '2026-07-22 08:28:18'),
('89', '5', '2', '4', 'candidate', '{\"candidate\":\"candidate:2143553127 1 udp 2122260223 10.84.8.204 57129 typ host generation 0 ufrag 6kP1 network-id 1 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6kP1\"}', '2026-07-22 08:28:18'),
('90', '5', '2', '4', 'candidate', '{\"candidate\":\"candidate:3488622759 1 udp 1685921535 154.159.237.193 7240 typ srflx raddr 10.22.85.193 rport 35367 generation 0 ufrag 6kP1 network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6kP1\"}', '2026-07-22 08:28:18'),
('91', '5', '2', '4', 'candidate', '{\"candidate\":\"candidate:247550277 1 udp 1685987071 154.159.237.193 3433 typ srflx raddr 100.20.163.176 rport 43402 generation 0 ufrag 6kP1 network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6kP1\"}', '2026-07-22 08:28:18'),
('92', '5', '2', '4', 'candidate', '{\"candidate\":\"candidate:1522387341 1 udp 1686052607 154.159.237.193 31868 typ srflx raddr 10.84.8.204 rport 57129 generation 0 ufrag 6kP1 network-id 1 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6kP1\"}', '2026-07-22 08:28:18'),
('93', '5', '2', '4', 'candidate', '{\"candidate\":\"candidate:1850416280 1 udp 1685855999 154.159.237.193 22478 typ srflx raddr 10.125.47.95 rport 50152 generation 0 ufrag 6kP1 network-id 4 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6kP1\"}', '2026-07-22 08:28:18'),
('94', '5', '2', '4', 'candidate', '{\"candidate\":\"candidate:4056266902 1 tcp 1518149375 10.22.85.193 9 typ host tcptype active generation 0 ufrag 6kP1 network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6kP1\"}', '2026-07-22 08:28:18'),
('95', '5', '2', '4', 'candidate', '{\"candidate\":\"candidate:2982208663 1 tcp 1518214911 100.20.163.176 9 typ host tcptype active generation 0 ufrag 6kP1 network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6kP1\"}', '2026-07-22 08:28:18'),
('96', '5', '2', '4', 'candidate', '{\"candidate\":\"candidate:1350470825 1 tcp 1518083839 10.125.47.95 9 typ host tcptype active generation 0 ufrag 6kP1 network-id 4 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6kP1\"}', '2026-07-22 08:28:18'),
('97', '5', '2', '4', 'candidate', '{\"candidate\":\"candidate:17556735 1 tcp 1518280447 10.84.8.204 9 typ host tcptype active generation 0 ufrag 6kP1 network-id 1 network-cost 10\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6kP1\"}', '2026-07-22 08:28:18'),
('98', '6', '2', '3', 'offer', '{\"sdp\":\"v=0\\r\\no=- 4251626852348475702 2 IN IP4 127.0.0.1\\r\\ns=-\\r\\nt=0 0\\r\\na=group:BUNDLE 0\\r\\na=extmap-allow-mixed\\r\\na=msid-semantic: WMS 8eee22db-cfb7-4ade-bd34-7cf49b26c7ba\\r\\nm=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126\\r\\nc=IN IP4 0.0.0.0\\r\\na=rtcp:9 IN IP4 0.0.0.0\\r\\na=ice-ufrag:9mr+\\r\\na=ice-pwd:jZAzSQml86AuQ8I/2n+T99Tm\\r\\na=ice-options:trickle\\r\\na=fingerprint:sha-256 14:B8:E3:7F:88:D1:EE:99:70:0E:D3:15:18:EF:1B:EF:6F:3D:79:B5:BD:56:91:D5:AB:15:3E:EA:7A:58:87:33\\r\\na=setup:actpass\\r\\na=mid:0\\r\\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\\r\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\r\\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\\r\\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\\r\\na=sendrecv\\r\\na=msid:8eee22db-cfb7-4ade-bd34-7cf49b26c7ba 809f1920-08c2-4070-9914-08c333a61b5d\\r\\na=rtcp-mux\\r\\na=rtcp-rsize\\r\\na=rtpmap:111 opus/48000/2\\r\\na=rtcp-fb:111 transport-cc\\r\\na=fmtp:111 minptime=10;useinbandfec=1\\r\\na=rtpmap:63 red/48000/2\\r\\na=fmtp:63 111/111\\r\\na=rtpmap:9 G722/8000\\r\\na=rtpmap:0 PCMU/8000\\r\\na=rtpmap:8 PCMA/8000\\r\\na=rtpmap:13 CN/8000\\r\\na=rtpmap:110 telephone-event/48000\\r\\na=rtpmap:126 telephone-event/8000\\r\\na=ssrc:1734271071 cname:UwnA7smIKlr597VT\\r\\na=ssrc:1734271071 msid:8eee22db-cfb7-4ade-bd34-7cf49b26c7ba 809f1920-08c2-4070-9914-08c333a61b5d\\r\\n\",\"type\":\"offer\"}', '2026-07-23 11:08:19'),
('99', '6', '2', '3', 'candidate', '{\"candidate\":\"candidate:2646473268 1 udp 2122260223 10.100.242.198 59161 typ host generation 0 ufrag 9mr+ network-id 1 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"9mr+\"}', '2026-07-23 11:08:20'),
('100', '6', '2', '3', 'candidate', '{\"candidate\":\"candidate:376819380 1 udp 2122194687 100.122.37.18 42016 typ host generation 0 ufrag 9mr+ network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"9mr+\"}', '2026-07-23 11:08:20'),
('101', '6', '2', '3', 'candidate', '{\"candidate\":\"candidate:1101927329 1 udp 2122129151 100.43.51.58 48396 typ host generation 0 ufrag 9mr+ network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"9mr+\"}', '2026-07-23 11:08:20'),
('102', '6', '2', '3', 'candidate', '{\"candidate\":\"candidate:1662463648 1 tcp 1518280447 10.100.242.198 9 typ host tcptype active generation 0 ufrag 9mr+ network-id 1 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"9mr+\"}', '2026-07-23 11:08:20'),
('103', '6', '2', '3', 'candidate', '{\"candidate\":\"candidate:3906935328 1 tcp 1518214911 100.122.37.18 9 typ host tcptype active generation 0 ufrag 9mr+ network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"9mr+\"}', '2026-07-23 11:08:20'),
('104', '6', '2', '3', 'candidate', '{\"candidate\":\"candidate:3204761397 1 tcp 1518149375 100.43.51.58 9 typ host tcptype active generation 0 ufrag 9mr+ network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"9mr+\"}', '2026-07-23 11:08:20'),
('105', '6', '2', '3', 'candidate', '{\"candidate\":\"candidate:3619396094 1 udp 1685987071 105.164.16.221 2169 typ srflx raddr 100.122.37.18 rport 42016 generation 0 ufrag 9mr+ network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"9mr+\"}', '2026-07-23 11:08:20'),
('106', '6', '2', '3', 'hangup', '{\"reason\":\"user_hangup\"}', '2026-07-23 11:08:33'),
('107', '7', '2', '3', 'offer', '{\"sdp\":\"v=0\\r\\no=- 6865257531575672757 2 IN IP4 127.0.0.1\\r\\ns=-\\r\\nt=0 0\\r\\na=group:BUNDLE 0 1\\r\\na=extmap-allow-mixed\\r\\na=msid-semantic: WMS 85e14014-c0ee-49f4-a19f-cd4987d46be8\\r\\nm=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126\\r\\nc=IN IP4 0.0.0.0\\r\\na=rtcp:9 IN IP4 0.0.0.0\\r\\na=ice-ufrag:sWyk\\r\\na=ice-pwd:fFUiVr45b8VzxM3j6NVyi234\\r\\na=ice-options:trickle\\r\\na=fingerprint:sha-256 E0:E8:D0:CB:83:25:98:64:E3:B6:82:8B:42:A7:F2:B9:4D:9E:0D:EE:6C:FC:28:DD:24:36:9D:58:79:62:39:40\\r\\na=setup:actpass\\r\\na=mid:0\\r\\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\\r\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\r\\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\\r\\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\\r\\na=sendrecv\\r\\na=msid:85e14014-c0ee-49f4-a19f-cd4987d46be8 331c6b39-09c1-407a-9f85-3de8bc342610\\r\\na=rtcp-mux\\r\\na=rtcp-rsize\\r\\na=rtpmap:111 opus/48000/2\\r\\na=rtcp-fb:111 transport-cc\\r\\na=fmtp:111 minptime=10;useinbandfec=1\\r\\na=rtpmap:63 red/48000/2\\r\\na=fmtp:63 111/111\\r\\na=rtpmap:9 G722/8000\\r\\na=rtpmap:0 PCMU/8000\\r\\na=rtpmap:8 PCMA/8000\\r\\na=rtpmap:13 CN/8000\\r\\na=rtpmap:110 telephone-event/48000\\r\\na=rtpmap:126 telephone-event/8000\\r\\na=ssrc:207679833 cname:N92Ghkzjb3qM0Oza\\r\\na=ssrc:207679833 msid:85e14014-c0ee-49f4-a19f-cd4987d46be8 331c6b39-09c1-407a-9f85-3de8bc342610\\r\\nm=video 9 UDP/TLS/RTP/SAVPF 96 97 39 40 98 99 103 104 119 120 109 114 115 116 45 46 123 124 125\\r\\nc=IN IP4 0.0.0.0\\r\\na=rtcp:9 IN IP4 0.0.0.0\\r\\na=ice-ufrag:sWyk\\r\\na=ice-pwd:fFUiVr45b8VzxM3j6NVyi234\\r\\na=ice-options:trickle\\r\\na=fingerprint:sha-256 E0:E8:D0:CB:83:25:98:64:E3:B6:82:8B:42:A7:F2:B9:4D:9E:0D:EE:6C:FC:28:DD:24:36:9D:58:79:62:39:40\\r\\na=setup:actpass\\r\\na=mid:1\\r\\na=extmap:14 urn:ietf:params:rtp-hdrext:toffset\\r\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\r\\na=extmap:13 urn:3gpp:video-orientation\\r\\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\\r\\na=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\\r\\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\\r\\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\\r\\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\\r\\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\\r\\na=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\\r\\na=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\\r\\na=sendrecv\\r\\na=msid:85e14014-c0ee-49f4-a19f-cd4987d46be8 ccc6064f-eb73-4a9b-9b76-226515da5d5b\\r\\na=rtcp-mux\\r\\na=rtcp-rsize\\r\\na=rtpmap:96 VP8/90000\\r\\na=rtcp-fb:96 goog-remb\\r\\na=rtcp-fb:96 transport-cc\\r\\na=rtcp-fb:96 ccm fir\\r\\na=rtcp-fb:96 nack\\r\\na=rtcp-fb:96 nack pli\\r\\na=rtpmap:97 rtx/90000\\r\\na=fmtp:97 apt=96\\r\\na=rtpmap:39 AV1/90000\\r\\na=rtcp-fb:39 goog-remb\\r\\na=rtcp-fb:39 transport-cc\\r\\na=rtcp-fb:39 ccm fir\\r\\na=rtcp-fb:39 nack\\r\\na=rtcp-fb:39 nack pli\\r\\na=fmtp:39 level-idx=5;profile=0;tier=0\\r\\na=rtpmap:40 rtx/90000\\r\\na=fmtp:40 apt=39\\r\\na=rtpmap:98 VP9/90000\\r\\na=rtcp-fb:98 goog-remb\\r\\na=rtcp-fb:98 transport-cc\\r\\na=rtcp-fb:98 ccm fir\\r\\na=rtcp-fb:98 nack\\r\\na=rtcp-fb:98 nack pli\\r\\na=fmtp:98 profile-id=0\\r\\na=rtpmap:99 rtx/90000\\r\\na=fmtp:99 apt=98\\r\\na=rtpmap:103 H264/90000\\r\\na=rtcp-fb:103 goog-remb\\r\\na=rtcp-fb:103 transport-cc\\r\\na=rtcp-fb:103 ccm fir\\r\\na=rtcp-fb:103 nack\\r\\na=rtcp-fb:103 nack pli\\r\\na=fmtp:103 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\\r\\na=rtpmap:104 rtx/90000\\r\\na=fmtp:104 apt=103\\r\\na=rtpmap:119 H264/90000\\r\\na=rtcp-fb:119 goog-remb\\r\\na=rtcp-fb:119 transport-cc\\r\\na=rtcp-fb:119 ccm fir\\r\\na=rtcp-fb:119 nack\\r\\na=rtcp-fb:119 nack pli\\r\\na=fmtp:119 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\\r\\na=rtpmap:120 rtx/90000\\r\\na=fmtp:120 apt=119\\r\\na=rtpmap:109 H264/90000\\r\\na=rtcp-fb:109 goog-remb\\r\\na=rtcp-fb:109 transport-cc\\r\\na=rtcp-fb:109 ccm fir\\r\\na=rtcp-fb:109 nack\\r\\na=rtcp-fb:109 nack pli\\r\\na=fmtp:109 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f\\r\\na=rtpmap:114 rtx/90000\\r\\na=fmtp:114 apt=109\\r\\na=rtpmap:115 H264/90000\\r\\na=rtcp-fb:115 goog-remb\\r\\na=rtcp-fb:115 transport-cc\\r\\na=rtcp-fb:115 ccm fir\\r\\na=rtcp-fb:115 nack\\r\\na=rtcp-fb:115 nack pli\\r\\na=fmtp:115 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f\\r\\na=rtpmap:116 rtx/90000\\r\\na=fmtp:116 apt=115\\r\\na=rtpmap:45 H265/90000\\r\\na=rtcp-fb:45 goog-remb\\r\\na=rtcp-fb:45 transport-cc\\r\\na=rtcp-fb:45 ccm fir\\r\\na=rtcp-fb:45 nack\\r\\na=rtcp-fb:45 nack pli\\r\\na=fmtp:45 level-id=90;profile-id=1;tier-flag=0;tx-mode=SRST\\r\\na=rtpmap:46 rtx/90000\\r\\na=fmtp:46 apt=45\\r\\na=rtpmap:123 red/90000\\r\\na=rtpmap:124 rtx/90000\\r\\na=fmtp:124 apt=123\\r\\na=rtpmap:125 ulpfec/90000\\r\\na=ssrc-group:FID 1637478559 3063055428\\r\\na=ssrc:1637478559 cname:N92Ghkzjb3qM0Oza\\r\\na=ssrc:1637478559 msid:85e14014-c0ee-49f4-a19f-cd4987d46be8 ccc6064f-eb73-4a9b-9b76-226515da5d5b\\r\\na=ssrc:3063055428 cname:N92Ghkzjb3qM0Oza\\r\\na=ssrc:3063055428 msid:85e14014-c0ee-49f4-a19f-cd4987d46be8 ccc6064f-eb73-4a9b-9b76-226515da5d5b\\r\\n\",\"type\":\"offer\"}', '2026-07-23 11:08:49'),
('108', '7', '2', '3', 'candidate', '{\"candidate\":\"candidate:2265450035 1 udp 2122260223 10.100.242.198 33647 typ host generation 0 ufrag sWyk network-id 1 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"sWyk\"}', '2026-07-23 11:08:49'),
('109', '7', '2', '3', 'candidate', '{\"candidate\":\"candidate:213922483 1 udp 2122194687 100.122.37.18 44338 typ host generation 0 ufrag sWyk network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"sWyk\"}', '2026-07-23 11:08:49'),
('110', '7', '2', '3', 'candidate', '{\"candidate\":\"candidate:1528557478 1 udp 2122129151 100.43.51.58 40496 typ host generation 0 ufrag sWyk network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"sWyk\"}', '2026-07-23 11:08:49'),
('111', '7', '2', '3', 'candidate', '{\"candidate\":\"candidate:2265450035 1 udp 2122260223 10.100.242.198 38459 typ host generation 0 ufrag sWyk network-id 1 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"sWyk\"}', '2026-07-23 11:08:49'),
('112', '7', '2', '3', 'candidate', '{\"candidate\":\"candidate:213922483 1 udp 2122194687 100.122.37.18 46069 typ host generation 0 ufrag sWyk network-id 2 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"sWyk\"}', '2026-07-23 11:08:49'),
('113', '7', '2', '3', 'candidate', '{\"candidate\":\"candidate:1528557478 1 udp 2122129151 100.43.51.58 58537 typ host generation 0 ufrag sWyk network-id 3 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"sWyk\"}', '2026-07-23 11:08:49'),
('114', '7', '2', '3', 'candidate', '{\"candidate\":\"candidate:3440272889 1 udp 1685987071 105.164.16.221 1986 typ srflx raddr 100.122.37.18 rport 44338 generation 0 ufrag sWyk network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"sWyk\"}', '2026-07-23 11:08:49'),
('115', '7', '2', '3', 'candidate', '{\"candidate\":\"candidate:3440272889 1 udp 1685987071 105.164.16.221 1985 typ srflx raddr 100.122.37.18 rport 46069 generation 0 ufrag sWyk network-id 2 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"sWyk\"}', '2026-07-23 11:08:49'),
('116', '7', '2', '3', 'candidate', '{\"candidate\":\"candidate:2040713895 1 tcp 1518280447 10.100.242.198 9 typ host tcptype active generation 0 ufrag sWyk network-id 1 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"sWyk\"}', '2026-07-23 11:08:49'),
('117', '7', '2', '3', 'candidate', '{\"candidate\":\"candidate:4067092007 1 tcp 1518214911 100.122.37.18 9 typ host tcptype active generation 0 ufrag sWyk network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"sWyk\"}', '2026-07-23 11:08:49'),
('118', '7', '2', '3', 'candidate', '{\"candidate\":\"candidate:2779855666 1 tcp 1518149375 100.43.51.58 9 typ host tcptype active generation 0 ufrag sWyk network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"sWyk\"}', '2026-07-23 11:08:49'),
('119', '7', '2', '3', 'candidate', '{\"candidate\":\"candidate:4067092007 1 tcp 1518214911 100.122.37.18 9 typ host tcptype active generation 0 ufrag sWyk network-id 2 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"sWyk\"}', '2026-07-23 11:08:49'),
('120', '7', '2', '3', 'candidate', '{\"candidate\":\"candidate:2040713895 1 tcp 1518280447 10.100.242.198 9 typ host tcptype active generation 0 ufrag sWyk network-id 1 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"sWyk\"}', '2026-07-23 11:08:49'),
('121', '7', '2', '3', 'candidate', '{\"candidate\":\"candidate:2779855666 1 tcp 1518149375 100.43.51.58 9 typ host tcptype active generation 0 ufrag sWyk network-id 3 network-cost 900\",\"sdpMid\":\"1\",\"sdpMLineIndex\":1,\"usernameFragment\":\"sWyk\"}', '2026-07-23 11:08:49'),
('122', '7', '2', '3', 'hangup', '{\"reason\":\"user_hangup\"}', '2026-07-23 11:08:54'),
('123', '7', '2', '3', 'hangup', '{\"reason\":\"user_hangup\"}', '2026-07-23 11:08:56'),
('124', '8', '3', '2', 'offer', '{\"sdp\":\"v=0\\r\\no=- 3249193065178735270 2 IN IP4 127.0.0.1\\r\\ns=-\\r\\nt=0 0\\r\\na=group:BUNDLE 0\\r\\na=extmap-allow-mixed\\r\\na=msid-semantic: WMS bb475052-20fc-41c3-877e-8bc7b25f3b68\\r\\nm=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126\\r\\nc=IN IP4 0.0.0.0\\r\\na=rtcp:9 IN IP4 0.0.0.0\\r\\na=ice-ufrag:6qp1\\r\\na=ice-pwd:jF9yQy9kaiKcYL+6rHHy89mK\\r\\na=ice-options:trickle\\r\\na=fingerprint:sha-256 24:12:1F:27:E8:82:C8:29:93:25:16:E5:4D:9F:80:C7:D5:90:20:26:91:78:DD:75:A7:46:28:AE:6C:40:24:F2\\r\\na=setup:actpass\\r\\na=mid:0\\r\\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\\r\\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\\r\\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\\r\\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\\r\\na=sendrecv\\r\\na=msid:bb475052-20fc-41c3-877e-8bc7b25f3b68 581a5519-c997-4f13-81f9-c1fca1ce7b0b\\r\\na=rtcp-mux\\r\\na=rtcp-rsize\\r\\na=rtpmap:111 opus/48000/2\\r\\na=rtcp-fb:111 transport-cc\\r\\na=fmtp:111 minptime=10;useinbandfec=1\\r\\na=rtpmap:63 red/48000/2\\r\\na=fmtp:63 111/111\\r\\na=rtpmap:9 G722/8000\\r\\na=rtpmap:0 PCMU/8000\\r\\na=rtpmap:8 PCMA/8000\\r\\na=rtpmap:13 CN/8000\\r\\na=rtpmap:110 telephone-event/48000\\r\\na=rtpmap:126 telephone-event/8000\\r\\na=ssrc:456116107 cname:dtLnUZfvTab9kzh3\\r\\na=ssrc:456116107 msid:bb475052-20fc-41c3-877e-8bc7b25f3b68 581a5519-c997-4f13-81f9-c1fca1ce7b0b\\r\\n\",\"type\":\"offer\"}', '2026-07-23 11:09:21'),
('125', '8', '3', '2', 'candidate', '{\"candidate\":\"candidate:1306893212 1 udp 2122260223 10.100.242.198 35465 typ host generation 0 ufrag 6qp1 network-id 1 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6qp1\"}', '2026-07-23 11:09:21'),
('126', '8', '3', '2', 'candidate', '{\"candidate\":\"candidate:3324882716 1 udp 2122194687 100.122.37.18 33044 typ host generation 0 ufrag 6qp1 network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6qp1\"}', '2026-07-23 11:09:21'),
('127', '8', '3', '2', 'candidate', '{\"candidate\":\"candidate:2448847369 1 udp 2122129151 100.43.51.58 33808 typ host generation 0 ufrag 6qp1 network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6qp1\"}', '2026-07-23 11:09:21'),
('128', '8', '3', '2', 'candidate', '{\"candidate\":\"candidate:132380758 1 udp 1685987071 105.164.16.221 2010 typ srflx raddr 100.122.37.18 rport 33044 generation 0 ufrag 6qp1 network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6qp1\"}', '2026-07-23 11:09:21'),
('129', '8', '3', '2', 'candidate', '{\"candidate\":\"candidate:3008319240 1 tcp 1518280447 10.100.242.198 9 typ host tcptype active generation 0 ufrag 6qp1 network-id 1 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6qp1\"}', '2026-07-23 11:09:21'),
('130', '8', '3', '2', 'candidate', '{\"candidate\":\"candidate:948403080 1 tcp 1518214911 100.122.37.18 9 typ host tcptype active generation 0 ufrag 6qp1 network-id 2 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6qp1\"}', '2026-07-23 11:09:21'),
('131', '8', '3', '2', 'candidate', '{\"candidate\":\"candidate:1868342941 1 tcp 1518149375 100.43.51.58 9 typ host tcptype active generation 0 ufrag 6qp1 network-id 3 network-cost 900\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0,\"usernameFragment\":\"6qp1\"}', '2026-07-23 11:09:21'),
('132', '8', '3', '2', 'hangup', '{\"reason\":\"user_hangup\"}', '2026-07-23 11:09:31'),
('133', '8', '3', '2', 'hangup', '{\"reason\":\"user_hangup\"}', '2026-07-23 11:09:32');

CREATE TABLE `dating_calls` (
  `call_id` int NOT NULL AUTO_INCREMENT,
  `caller_id` int NOT NULL,
  `callee_id` int NOT NULL,
  `call_type` enum('audio','video') NOT NULL DEFAULT 'video',
  `status` enum('ringing','active','ended','declined','missed','cancelled') NOT NULL DEFAULT 'ringing',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `started_at` timestamp NULL DEFAULT NULL,
  `ended_at` timestamp NULL DEFAULT NULL,
  `ended_by` int DEFAULT NULL,
  PRIMARY KEY (`call_id`),
  KEY `idx_callee_status` (`callee_id`,`status`),
  KEY `idx_caller_status` (`caller_id`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `dating_calls` (`call_id`, `caller_id`, `callee_id`, `call_type`, `status`, `created_at`, `started_at`, `ended_at`, `ended_by`) VALUES
('1', '2', '3', 'audio', 'ended', '2026-07-22 08:20:35', NULL, '2026-07-22 08:20:52', '2'),
('2', '2', '4', 'video', 'ended', '2026-07-22 08:22:48', '2026-07-22 08:23:05', '2026-07-22 08:25:18', '4'),
('3', '2', '4', 'video', 'ended', '2026-07-22 08:25:33', '2026-07-22 08:25:38', '2026-07-22 08:25:58', '2'),
('4', '2', '4', 'audio', 'ended', '2026-07-22 08:27:17', NULL, '2026-07-22 08:27:54', '2'),
('5', '4', '2', 'audio', 'active', '2026-07-22 08:28:08', '2026-07-22 08:28:17', NULL, NULL),
('6', '2', '3', 'audio', 'ended', '2026-07-23 11:08:18', NULL, '2026-07-23 11:08:34', '2'),
('7', '2', '3', 'video', 'ended', '2026-07-23 11:08:47', NULL, '2026-07-23 11:08:54', '2'),
('8', '3', '2', 'audio', 'ended', '2026-07-23 11:09:20', NULL, '2026-07-23 11:09:31', '3');

CREATE TABLE `dating_friend_requests` (
  `request_id` int NOT NULL AUTO_INCREMENT,
  `sender_id` int NOT NULL,
  `receiver_id` int NOT NULL,
  `status` enum('pending','accepted','declined') DEFAULT 'pending',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`request_id`),
  UNIQUE KEY `unique_request` (`sender_id`,`receiver_id`),
  KEY `receiver_id` (`receiver_id`),
  CONSTRAINT `dating_friend_requests_ibfk_1` FOREIGN KEY (`sender_id`) REFERENCES `dating_users` (`user_id`),
  CONSTRAINT `dating_friend_requests_ibfk_2` FOREIGN KEY (`receiver_id`) REFERENCES `dating_users` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `dating_friend_requests` (`request_id`, `sender_id`, `receiver_id`, `status`, `created_at`) VALUES
('2', '2', '1', 'accepted', '2026-07-04 15:03:19'),
('3', '3', '1', 'pending', '2026-07-23 11:07:17');

CREATE TABLE `dating_likes` (
  `like_id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `liked_user_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`like_id`),
  UNIQUE KEY `unique_like` (`user_id`,`liked_user_id`),
  KEY `liked_user_id` (`liked_user_id`),
  CONSTRAINT `dating_likes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `dating_users` (`user_id`),
  CONSTRAINT `dating_likes_ibfk_2` FOREIGN KEY (`liked_user_id`) REFERENCES `dating_users` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `dating_likes` (`like_id`, `user_id`, `liked_user_id`, `created_at`) VALUES
('1', '2', '1', '2026-07-04 09:39:32'),
('4', '3', '2', '2026-07-04 13:47:44'),
('5', '2', '3', '2026-07-04 15:00:57'),
('6', '1', '2', '2026-07-04 15:04:13'),
('8', '3', '1', '2026-07-05 01:02:34'),
('10', '2', '4', '2026-07-09 16:01:28'),
('11', '4', '2', '2026-07-09 16:02:53'),
('12', '3', '21', '2026-07-15 04:17:06'),
('13', '21', '3', '2026-07-15 04:17:06'),
('19', '3', '4', '2026-07-23 11:51:06'),
('20', '3', '14', '2026-07-23 11:51:10'),
('21', '14', '3', '2026-07-23 11:51:10');

CREATE TABLE `dating_matches` (
  `match_id` int NOT NULL AUTO_INCREMENT,
  `user1_id` int NOT NULL,
  `user2_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`match_id`),
  UNIQUE KEY `unique_match` (`user1_id`,`user2_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `dating_matches` (`match_id`, `user1_id`, `user2_id`, `created_at`) VALUES
('2', '1', '2', '2026-07-04 15:04:13'),
('4', '2', '4', '2026-07-09 16:02:53'),
('5', '3', '21', '2026-07-15 04:17:06'),
('6', '3', '14', '2026-07-23 11:51:10');

CREATE TABLE `dating_messages` (
  `message_id` int NOT NULL AUTO_INCREMENT,
  `sender_id` int NOT NULL,
  `receiver_id` int NOT NULL,
  `message` text,
  `sent_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `photo` varchar(255) DEFAULT NULL,
  `is_read` tinyint(1) DEFAULT '0',
  `edited_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`message_id`),
  KEY `sender_id` (`sender_id`),
  KEY `receiver_id` (`receiver_id`),
  CONSTRAINT `dating_messages_ibfk_1` FOREIGN KEY (`sender_id`) REFERENCES `dating_users` (`user_id`),
  CONSTRAINT `dating_messages_ibfk_2` FOREIGN KEY (`receiver_id`) REFERENCES `dating_users` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `dating_messages` (`message_id`, `sender_id`, `receiver_id`, `message`, `sent_at`, `photo`, `is_read`, `edited_at`, `deleted_at`) VALUES
('1', '3', '2', 'Hi', '2026-07-04 14:26:55', NULL, '1', NULL, NULL),
('2', '3', '2', 'Hibnnnnn', '2026-07-04 14:27:09', NULL, '1', NULL, NULL),
('3', '3', '2', 'HibnnnnnDdddddddd', '2026-07-04 14:27:13', NULL, '1', NULL, NULL),
('4', '3', '2', 'HibnnnnnDddddddddFff', '2026-07-04 14:27:15', NULL, '1', NULL, NULL),
('5', '3', '2', 'HibnnnnnDddddddddFff', '2026-07-04 14:27:15', NULL, '1', NULL, NULL),
('6', '3', '2', 'HibnnnnnDddddddddFff', '2026-07-04 14:27:16', NULL, '1', NULL, NULL),
('7', '3', '2', NULL, '2026-07-04 14:32:38', 'chat_6a4951c63da05.png', '1', NULL, NULL),
('8', '3', '2', NULL, '2026-07-04 14:32:47', 'chat_6a4951cf88ad7.png', '1', NULL, NULL),
('9', '2', '3', 'Hi', '2026-07-04 14:52:31', NULL, '1', NULL, NULL),
('10', '2', '3', 'Hi mum', '2026-07-04 14:58:41', NULL, '1', NULL, NULL),
('11', '2', '3', 'Hi too', '2026-07-04 14:59:23', NULL, '1', NULL, NULL),
('12', '2', '3', 'Hi too', '2026-07-04 14:59:32', NULL, '1', NULL, NULL),
('13', '2', '3', 'Okey', '2026-07-04 15:01:58', NULL, '1', NULL, NULL),
('14', '1', '3', 'Sasa', '2026-07-04 15:04:56', NULL, '1', NULL, NULL),
('15', '1', '2', 'Hi', '2026-07-05 00:44:23', NULL, '1', NULL, NULL),
('16', '1', '2', 'Hello', '2026-07-05 00:52:04', NULL, '1', NULL, NULL),
('17', '1', '2', 'Poa', '2026-07-05 01:02:01', NULL, '1', NULL, NULL),
('18', '3', '2', 'Okay', '2026-07-05 01:03:39', NULL, '1', NULL, NULL),
('19', '3', '2', 'Pole sana', '2026-07-05 01:04:23', NULL, '1', NULL, NULL),
('20', '3', '2', 'Hi', '2026-07-05 01:25:55', NULL, '1', NULL, NULL),
('21', '3', '2', 'Hi', '2026-07-05 01:29:28', NULL, '1', NULL, NULL),
('22', '3', '2', 'Hi', '2026-07-05 01:46:12', NULL, '1', NULL, NULL),
('23', '3', '2', 'Pole', '2026-07-05 01:47:58', NULL, '1', NULL, NULL),
('24', '3', '2', 'Pole', '2026-07-05 01:48:11', NULL, '1', NULL, NULL),
('25', '3', '2', 'Wow', '2026-07-05 01:58:14', NULL, '1', NULL, NULL),
('26', '3', '2', 'It\'s working', '2026-07-05 01:58:28', NULL, '1', NULL, NULL),
('27', '3', '2', NULL, '2026-07-05 01:59:06', 'chat_6a49f2a9ac3a0.png', '1', NULL, NULL),
('28', '1', '2', 'Hi mary', '2026-07-05 02:18:53', NULL, '1', NULL, NULL),
('29', '2', '3', 'Seen', '2026-07-05 02:20:31', NULL, '1', NULL, NULL),
('30', '2', '3', 'Pooe samnjjdjjfjfjj\nJhhsjdjdc\nDxujdid\nDusuud\nHdgdhd\nHskdjd\nYuuidjdjdjdd\nYuidididiidiid\nYuudusuusud\nDsuuduudd\nUuufff jjdhdhdhyduduududuudufuufuufuufuuufu', '2026-07-05 02:26:07', NULL, '1', '2026-07-05 02:53:19', NULL),
('31', '2', '3', NULL, '2026-07-05 02:28:38', NULL, '1', NULL, '2026-07-05 02:44:49'),
('32', '2', '3', 'Okey', '2026-07-05 02:53:39', NULL, '1', NULL, NULL),
('33', '2', '3', NULL, '2026-07-05 02:58:25', 'chat_6a4a009127bec.png', '1', NULL, NULL),
('34', '2', '1', 'Hi', '2026-07-08 13:08:37', NULL, '1', NULL, NULL),
('35', '3', '2', 'Hi', '2026-07-08 14:24:46', NULL, '1', NULL, NULL),
('36', '4', '2', 'Hi', '2026-07-09 16:03:30', NULL, '1', NULL, NULL),
('37', '2', '4', 'Poa', '2026-07-09 16:03:48', NULL, '1', NULL, NULL),
('38', '4', '2', 'Marry me', '2026-07-09 16:04:05', NULL, '1', NULL, NULL),
('39', '2', '4', 'Ghhgh', '2026-07-09 16:04:34', NULL, '1', NULL, NULL),
('40', '2', '4', 'Ghhgh', '2026-07-09 16:04:34', NULL, '1', NULL, NULL),
('41', '2', '4', NULL, '2026-07-09 16:05:25', 'chat_6a4fff052f8f1.png', '1', NULL, NULL),
('42', '2', '4', NULL, '2026-07-09 16:06:15', 'chat_6a4fff366f84f.jpg', '1', NULL, NULL),
('43', '2', '4', NULL, '2026-07-09 16:06:17', 'chat_6a4fff3811356.jpg', '1', NULL, NULL),
('44', '2', '4', NULL, '2026-07-09 16:06:18', 'chat_6a4fff3931e11.jpg', '1', NULL, NULL),
('45', '4', '2', 'Ukoje', '2026-07-09 16:06:58', NULL, '1', NULL, NULL),
('46', '2', '4', NULL, '2026-07-09 16:07:45', NULL, '1', NULL, '2026-07-09 16:08:24'),
('47', '4', '2', NULL, '2026-07-09 16:08:33', 'chat_6a4fffb9858f4.jpg', '1', NULL, NULL),
('48', '4', '2', NULL, '2026-07-09 16:08:43', 'chat_6a4fffc406edd.jpg', '1', NULL, NULL),
('49', '2', '3', NULL, '2026-07-09 16:22:02', 'chat_6a5002ea92ecd.jpg', '1', NULL, NULL),
('50', '2', '3', NULL, '2026-07-09 16:22:04', NULL, '1', NULL, '2026-07-09 16:24:08'),
('51', '2', '3', NULL, '2026-07-09 16:23:02', 'chat_6a500325f3a5b.jpg', '1', NULL, NULL),
('52', '2', '3', NULL, '2026-07-09 16:23:40', 'chat_6a50034ae5915.jpg', '1', NULL, NULL),
('53', '2', '3', NULL, '2026-07-09 16:23:42', NULL, '1', NULL, '2026-07-09 16:23:59'),
('54', '3', '2', 'Hi', '2026-07-15 04:17:24', NULL, '1', NULL, NULL),
('55', '2', '3', NULL, '2026-07-22 08:20:08', 'chat_6a60b577c479d.jpg', '1', NULL, NULL),
('56', '2', '4', 'Hi', '2026-07-22 08:22:28', NULL, '1', NULL, NULL),
('57', '4', '2', 'Hi', '2026-07-22 08:26:26', NULL, '1', NULL, NULL),
('58', '4', '2', NULL, '2026-07-22 08:26:53', 'chat_6a60b70db646d.jpg', '1', NULL, NULL),
('59', '3', '1', 'Hi', '2026-07-23 11:20:01', NULL, '0', NULL, NULL);

CREATE TABLE `dating_notifications` (
  `notification_id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `type` varchar(30) NOT NULL,
  `message` varchar(255) NOT NULL,
  `link` varchar(255) DEFAULT NULL,
  `is_read` tinyint(1) DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`notification_id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `dating_notifications` (`notification_id`, `user_id`, `type`, `message`, `link`, `is_read`, `created_at`) VALUES
('1', '2', 'match', 'You matched with Mary!', 'chat.php?with=3', '1', '2026-07-04 15:00:57'),
('2', '3', 'match', 'You matched with Joyce!', 'chat.php?with=2', '1', '2026-07-04 15:00:57'),
('3', '1', 'friend_request', 'Joyce sent you a friend request.', 'friends.php', '1', '2026-07-04 15:03:19'),
('4', '1', 'match', 'You matched with Joyce!', 'chat.php?with=2', '1', '2026-07-04 15:04:13'),
('5', '2', 'match', 'You matched with Bimwa!', 'chat.php?with=1', '1', '2026-07-04 15:04:13'),
('6', '1', 'match', 'You matched with Mary!', 'chat.php?with=3', '1', '2026-07-04 15:04:36'),
('7', '3', 'match', 'You matched with Bimwa!', 'chat.php?with=1', '1', '2026-07-04 15:04:36'),
('8', '2', 'friend_accept', 'Bimwa accepted your friend request.', 'friends.php', '1', '2026-07-04 15:05:13'),
('9', '4', 'match', 'You matched with Joyce!', 'chat.php?with=2', '0', '2026-07-09 16:02:53'),
('10', '2', 'match', 'You matched with Maryw!', 'chat.php?with=4', '1', '2026-07-09 16:02:53'),
('11', '3', 'match', 'You matched with esther_naliaka!', 'chat.php?with=21', '1', '2026-07-15 04:17:06'),
('12', '21', 'match', 'You matched with Mary!', 'chat.php?with=3', '0', '2026-07-15 04:17:06'),
('13', '1', 'friend_request', 'Mary sent you a friend request.', 'friends.php', '0', '2026-07-23 11:07:17'),
('14', '2', 'call_missed_offline', 'Mary tried to call you while you were offline — call them back!', 'chat.php?with=3', '1', '2026-07-23 11:07:39'),
('15', '2', 'call_missed_offline', 'Mary tried to call you while you were offline — call them back!', 'chat.php?with=3', '1', '2026-07-23 11:07:54'),
('16', '3', 'match', 'You matched with victor_cheruiyot!', 'chat.php?with=14', '1', '2026-07-23 11:51:10'),
('17', '14', 'match', 'You matched with Mary!', 'chat.php?with=3', '0', '2026-07-23 11:51:10');

CREATE TABLE `dating_passes` (
  `pass_id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `passed_user_id` int NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`pass_id`),
  UNIQUE KEY `uniq_pass` (`user_id`,`passed_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

CREATE TABLE `dating_reports` (
  `report_id` int NOT NULL AUTO_INCREMENT,
  `reporter_id` int NOT NULL,
  `reported_id` int NOT NULL,
  `reason` varchar(255) NOT NULL,
  `details` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`report_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

CREATE TABLE `dating_search_log` (
  `log_id` int NOT NULL AUTO_INCREMENT,
  `user_id` int NOT NULL,
  `query` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`log_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `dating_search_log` (`log_id`, `user_id`, `query`, `created_at`) VALUES
('1', '3', 'yraM', '2026-07-05 02:17:58'),
('2', '3', 'y rayraMM', '2026-07-05 02:18:07'),
('3', '3', 'e cycoyJ rayraMM', '2026-07-05 02:18:18');

CREATE TABLE `dating_typing` (
  `user_id` int NOT NULL,
  `with_user_id` int NOT NULL,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`user_id`,`with_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `dating_typing` (`user_id`, `with_user_id`, `updated_at`) VALUES
('2', '4', '2026-07-22 08:26:15');

CREATE TABLE `dating_users` (
  `user_id` int NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `first_name` varchar(50) DEFAULT NULL,
  `last_name` varchar(50) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `email` varchar(100) DEFAULT NULL,
  `age` int DEFAULT NULL,
  `gender` varchar(10) DEFAULT NULL,
  `bio` text,
  `photo` varchar(255) DEFAULT 'default.jpg',
  `county` varchar(50) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `preferred_gender` varchar(10) DEFAULT 'any',
  `last_active` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `skin_colour` varchar(30) DEFAULT NULL,
  `preferred_colour` varchar(30) DEFAULT 'any',
  `relationship_status` varchar(30) DEFAULT NULL,
  `preferred_age_min` int DEFAULT '18',
  `preferred_age_max` int DEFAULT '99',
  `is_demo` tinyint(1) NOT NULL DEFAULT '0',
  `google_id` varchar(64) DEFAULT NULL,
  `facebook_id` varchar(64) DEFAULT NULL,
  `profile_completed` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `username` (`username`),
  UNIQUE KEY `google_id` (`google_id`),
  UNIQUE KEY `facebook_id` (`facebook_id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `dating_users` (`user_id`, `username`, `first_name`, `last_name`, `phone`, `password`, `email`, `age`, `gender`, `bio`, `photo`, `county`, `created_at`, `preferred_gender`, `last_active`, `skin_colour`, `preferred_colour`, `relationship_status`, `preferred_age_min`, `preferred_age_max`, `is_demo`, `google_id`, `facebook_id`, `profile_completed`) VALUES
('1', 'Bimwa', NULL, NULL, NULL, '$2y$10$JNOkUCzESaziXgsO3a5pvOJLOfOvFY2MMTR1644.j/A3hLwrF5ub2', 'bidan4554@gmail.com', '26', 'male', 'Single and searching', 'default.jpg', 'Nakuru', '2026-07-04 09:17:41', 'any', '2026-07-08 14:25:31', NULL, 'any', NULL, '18', '99', '0', NULL, NULL, '1'),
('2', 'Joyce', NULL, NULL, NULL, '$2y$10$IugOJgviKI3suHxlBbyTauIiO.zDgNJlQV1cQh5rwIbUE6wE8cN3.', 'bimwa1022@gmail.com', '30', 'male', 'I like them', 'user_6a490cf54c8cc.png', 'Molo', '2026-07-04 09:39:05', 'any', '2026-07-23 11:08:07', NULL, 'any', NULL, '18', '99', '0', NULL, NULL, '1'),
('3', 'Mary', 'Mary', 'Wairimu', '0719119493', '$2y$10$ot6aLK4zXvNwQYYMRz2tPed4Q3XXCVyIOU.4hM1M3ARrwiQUP0ZsS', 'wairimu@gmail.com', '31', 'female', 'I like ?', 'user_6a491bf74e7d3.jpg', 'NAKURU', '2026-07-04 10:43:56', 'female', '2026-07-23 11:51:30', 'Chocolate', 'Chocolate', 'Single', '18', '99', '0', NULL, NULL, '1'),
('4', 'Maryw', 'Mary', 'Wairimu', '0719119493', '$2y$10$QS3qpSn4FcrxJNFFVJ3LlOBPggpI3Cs0H2Np5pfOJ6/TQgNQ2E6ra', 'wairimumary279@gmail.com', '28', 'female', NULL, 'user_6a4ffdadd543f.jpg', NULL, '2026-07-09 16:00:59', 'any', '2026-07-22 08:22:37', 'Chocolate', 'Light Brown / Caramel', 'Single', '18', '99', '0', NULL, NULL, '1'),
('5', 'james_otieno', 'James', 'Otieno', '0798684327', '$2y$10$9FgPQn3KQ8MTOOXxOSqLueIurEmQJVA3cbDLqw1Pa7lLtphlehFQy', 'james_otieno@example.com', '28', 'male', 'Coffee first, everything else after. Love hiking and trying new restaurants.', 'demo_james_otieno.jpg', 'Nairobi', '2026-07-15 04:10:57', 'female', '2026-07-15 04:10:57', 'Fair / Light Skin', 'any', 'Single', '18', '50', '1', NULL, NULL, '1'),
('6', 'brian_kimani', 'Brian', 'Kimani', '0761242640', '$2y$10$WS2HScxHVDdKk2iuR/a6nOhhUUzocU2IwLMNJjymfYosiiLvvZuKe', 'brian_kimani@example.com', '24', 'male', 'Here for genuine conversations, not games. Big fan of good music and road trips.', 'demo_brian_kimani.jpg', 'Mombasa', '2026-07-15 04:10:58', 'female', '2026-07-15 04:10:58', 'Brown', 'any', 'Widow', '18', '50', '1', NULL, NULL, '1'),
('7', 'kevin_mwangi', 'Kevin', 'Mwangi', '0704177690', '$2y$10$2Q9Ailbppo6jwXj09e8qd.DQ35dSXCn3dku7QbTMfJe/iZAbuE4Ya', 'kevin_mwangi@example.com', '33', 'male', 'Fitness enthusiast, dog lover, and terrible cook (working on it).', 'demo_kevin_mwangi.jpg', 'Kisumu', '2026-07-15 04:10:58', 'female', '2026-07-15 04:10:58', 'Light Brown / Caramel', 'any', 'Single with kid(s)', '18', '50', '1', NULL, NULL, '1'),
('8', 'david_kiptoo', 'David', 'Kiptoo', '0719759874', '$2y$10$ro6cxZIdSzPYcZdpNeDs8eHjJVuVgVz3yj8BUZZfmcHb5SFeuV686', 'david_kiptoo@example.com', '45', 'male', 'Bookworm by night, gym rat by morning. Let\'s talk about your favourite show.', 'demo_david_kiptoo.jpg', 'Nakuru', '2026-07-15 04:10:58', 'female', '2026-07-15 04:10:58', 'Dark Brown', 'any', 'Widow', '18', '50', '1', NULL, NULL, '1'),
('9', 'peter_odhiambo', 'Peter', 'Odhiambo', '0769475137', '$2y$10$q8HSiFALU.qG7gClQIeK2e4P5YP762JzAsQYukgh2T3BW6aB0Hedu', 'peter_odhiambo@example.com', '21', 'male', 'Simple person looking for something real. I laugh a lot, fair warning.', 'demo_peter_odhiambo.jpg', 'Eldoret', '2026-07-15 04:10:59', 'female', '2026-07-15 04:10:59', 'Light Brown / Caramel', 'any', 'Divorced', '18', '50', '1', NULL, NULL, '1'),
('10', 'samuel_wafula', 'Samuel', 'Wafula', '0765490860', '$2y$10$Z/cDSlklWIkeKiRQ1.7EC.J9rm57L615jlzGGWCs/cIh7iOvOjVTS', 'samuel_wafula@example.com', '38', 'male', 'Foodie exploring Nairobi one restaurant at a time. Ask me for recommendations.', 'demo_samuel_wafula.jpg', 'Kiambu', '2026-07-15 04:10:59', 'female', '2026-07-15 04:10:59', 'Brown', 'any', 'Single', '18', '50', '1', NULL, NULL, '1'),
('11', 'eric_njoroge', 'Eric', 'Njoroge', '0737953185', '$2y$10$vGG8MD23AM/efq6Uwr0zzuUope.mP6vY4KFn1ji4iciITpB94CKee', 'eric_njoroge@example.com', '19', 'male', 'Weekend hiker, weekday hustler. Looking for someone to share adventures with.', 'demo_eric_njoroge.jpg', 'Machakos', '2026-07-15 04:10:59', 'female', '2026-07-15 04:10:59', 'Fair / Light Skin', 'any', 'Single with kid(s)', '18', '50', '1', NULL, NULL, '1'),
('12', 'dennis_omondi', 'Dennis', 'Omondi', '0781983450', '$2y$10$Xz5kUxZsJrkr7OfLpSxA.uowo.1fT3cxHFaVP7rEGnNvu2F296vAm', 'dennis_omondi@example.com', '50', 'male', 'Music, movies, and good vibes only. Let\'s see where this goes.', 'demo_dennis_omondi.jpg', 'Kajiado', '2026-07-15 04:11:00', 'female', '2026-07-15 04:11:00', 'Dark Brown', 'any', 'Divorced', '18', '50', '1', NULL, NULL, '1'),
('13', 'collins_mutua', 'Collins', 'Mutua', '0775825439', '$2y$10$thM6iacOjdNOB4OreT7btuCNGZBLzhUiQfhrP8yCgW/4UkQi5.Teq', 'collins_mutua@example.com', '26', 'male', 'New in town and figuring life out. Love deep talks and even deeper naps.', 'demo_collins_mutua.jpg', 'Nairobi', '2026-07-15 04:11:00', 'female', '2026-07-15 04:11:00', 'Brown', 'any', 'Single with kid(s)', '18', '50', '1', NULL, NULL, '1'),
('14', 'victor_cheruiyot', 'Victor', 'Cheruiyot', '0773244321', '$2y$10$fjGe9lAg1hWJdoSJUdV39uZAJH8ni7kTM8.GxPMLIuRRfGjP7PbWq', 'victor_cheruiyot@example.com', '41', 'male', 'Family-oriented, hardworking, and always up for a good laugh.', 'demo_victor_cheruiyot.jpg', 'Mombasa', '2026-07-15 04:11:01', 'female', '2026-07-15 04:11:01', 'Dark Brown', 'any', 'Single with kid(s)', '18', '50', '1', NULL, NULL, '1'),
('15', 'mary_wanjiru', 'Mary', 'Wanjiru', '0748610462', '$2y$10$fgSzZaLWqyZzI7VmmJJd9.YxlKq9zMjInafEY3C73Z1Mzpg8h1AAK', 'mary_wanjiru@example.com', '25', 'female', 'Coffee first, everything else after. Love hiking and trying new restaurants.', 'demo_mary_wanjiru.jpg', 'Nairobi', '2026-07-15 04:11:01', 'male', '2026-07-15 04:11:01', 'Black', 'any', 'Widow', '18', '50', '1', NULL, NULL, '1'),
('16', 'faith_achieng', 'Faith', 'Achieng', '0730946381', '$2y$10$b59z32M7v54ubw2l4y4XhuiMcbqBvEvyXfiI/hSNuqKU/Y45pl1au', 'faith_achieng@example.com', '22', 'female', 'Here for genuine conversations, not games. Big fan of good music and road trips.', 'demo_faith_achieng.jpg', 'Mombasa', '2026-07-15 04:11:01', 'male', '2026-07-15 04:11:01', 'Black', 'any', 'Single', '18', '50', '1', NULL, NULL, '1'),
('17', 'grace_nyambura', 'Grace', 'Nyambura', '0779991854', '$2y$10$nkOJ/Z2N3XI4V5cwDsvKaeN26T3EWGGDGq2UFE1h62DMN95iBQLMq', 'grace_nyambura@example.com', '30', 'female', 'Fitness enthusiast, dog lover, and terrible cook (working on it).', 'demo_grace_nyambura.jpg', 'Kisumu', '2026-07-15 04:11:02', 'male', '2026-07-15 04:11:02', 'Dark Brown', 'any', 'Divorced', '18', '50', '1', NULL, NULL, '1'),
('18', 'joyce_chebet', 'Joyce', 'Chebet', '0761552328', '$2y$10$hetQWncIrgxb/RUvPtGSou36RXiINhJKMOsLsYWTt..6RruZGJmPe', 'joyce_chebet@example.com', '47', 'female', 'Bookworm by night, gym rat by morning. Let\'s talk about your favourite show.', 'demo_joyce_chebet.jpg', 'Nakuru', '2026-07-15 04:11:02', 'male', '2026-07-15 04:11:02', 'Fair / Light Skin', 'any', 'Single', '18', '50', '1', NULL, NULL, '1'),
('19', 'winnie_adhiambo', 'Winnie', 'Adhiambo', '0717374080', '$2y$10$ZzBKUrAIwgw1/4zI6NBKR.TAnmBgYgkNmiptq.cbG8ftsUYAtYv6S', 'winnie_adhiambo@example.com', '18', 'female', 'Simple person looking for something real. I laugh a lot, fair warning.', 'demo_winnie_adhiambo.jpg', 'Eldoret', '2026-07-15 04:11:02', 'male', '2026-07-15 04:11:02', 'Fair / Light Skin', 'any', 'Single', '18', '50', '1', NULL, NULL, '1'),
('20', 'susan_wambui', 'Susan', 'Wambui', '0782685315', '$2y$10$S8tg.hQA.4VWmg2n4kVraeKFo9J0yniptE1IZbz036ApDVpgd6OeO', 'susan_wambui@example.com', '36', 'female', 'Foodie exploring Nairobi one restaurant at a time. Ask me for recommendations.', 'demo_susan_wambui.jpg', 'Kiambu', '2026-07-15 04:11:03', 'male', '2026-07-15 04:11:03', 'Fair / Light Skin', 'any', 'Widow', '18', '50', '1', NULL, NULL, '1'),
('21', 'esther_naliaka', 'Esther', 'Naliaka', '0745757364', '$2y$10$FJLTXPmXgUU76k4eqpP5IuPTGenZjtzoqOJR0leRQVpwGDCj8FAHG', 'esther_naliaka@example.com', '29', 'female', 'Weekend hiker, weekday hustler. Looking for someone to share adventures with.', 'demo_esther_naliaka.jpg', 'Machakos', '2026-07-15 04:11:04', 'male', '2026-07-15 04:11:04', 'Fair / Light Skin', 'any', 'Single', '18', '50', '1', NULL, NULL, '1'),
('22', 'purity_moraa', 'Purity', 'Moraa', '0704589500', '$2y$10$ywh8JAU.FXCnzbZNzoVhLeFrxRjd72LJCBugp8XNjTY39VPwz06L.', 'purity_moraa@example.com', '43', 'female', 'Music, movies, and good vibes only. Let\'s see where this goes.', 'demo_purity_moraa.jpg', 'Kajiado', '2026-07-15 04:11:04', 'male', '2026-07-15 04:11:04', 'Brown', 'any', 'Divorced', '18', '50', '1', NULL, NULL, '1'),
('23', 'sharon_auma', 'Sharon', 'Auma', '0722864878', '$2y$10$UFKuczumFDXuWgPqYWgMkOWz6V.pwO8S/Yw283.Z.5A4jCCIUSLqC', 'sharon_auma@example.com', '24', 'female', 'New in town and figuring life out. Love deep talks and even deeper naps.', 'demo_sharon_auma.jpg', 'Nairobi', '2026-07-15 04:11:05', 'male', '2026-07-15 04:11:05', 'Chocolate', 'any', 'Single with kid(s)', '18', '50', '1', NULL, NULL, '1'),
('24', 'diana_jepkosgei', 'Diana', 'Jepkosgei', '0777252239', '$2y$10$Cq84G8bnaaixCSnxadncn.e0m.Hj.JcWOj.Nxo9QWg1cdTwGb7SRi', 'diana_jepkosgei@example.com', '39', 'female', 'Family-oriented, hardworking, and always up for a good laugh.', 'demo_diana_jepkosgei.jpg', 'Mombasa', '2026-07-15 04:11:06', 'male', '2026-07-15 04:11:06', 'Fair / Light Skin', 'any', 'Single with kid(s)', '18', '50', '1', NULL, NULL, '1');

CREATE TABLE `extra_labour` (
  `id` int NOT NULL AUTO_INCREMENT,
  `planting_id` int NOT NULL,
  `labour_date` date NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  `amount` decimal(12,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `planting_id` (`planting_id`),
  CONSTRAINT `extra_labour_ibfk_1` FOREIGN KEY (`planting_id`) REFERENCES `plantings` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `extra_labour` (`id`, `planting_id`, `labour_date`, `description`, `amount`, `created_at`) VALUES
('18', '70', '2026-06-15', 'Weeding', '600.00', '2026-06-15 05:14:57'),
('19', '70', '2026-07-01', 'Molding', '600.00', '2026-07-01 13:07:49'),
('20', '72', '2026-07-03', 'Weeding', '400.00', '2026-07-03 07:56:01'),
('21', '76', '2026-07-20', 'We', '10.00', '2026-07-20 14:38:01');

CREATE TABLE `farmers` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `phone` varchar(20) NOT NULL,
  `email` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `farmers` (`id`, `name`, `phone`, `email`, `created_at`) VALUES
('1', 'Default Farmer', '+254712345678', 'farmer@example.com', '2026-05-25 18:48:33');

CREATE TABLE `foliar_applications` (
  `id` int NOT NULL AUTO_INCREMENT,
  `planting_id` int NOT NULL,
  `application_date` date NOT NULL,
  `product_name` varchar(100) DEFAULT NULL,
  `quantity_liters` decimal(10,2) DEFAULT NULL,
  `total_cost` decimal(12,2) NOT NULL,
  `notes` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `planting_id` (`planting_id`),
  CONSTRAINT `foliar_applications_ibfk_1` FOREIGN KEY (`planting_id`) REFERENCES `plantings` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `foliar_applications` (`id`, `planting_id`, `application_date`, `product_name`, `quantity_liters`, `total_cost`, `notes`, `created_at`) VALUES
('2', '70', '2026-06-26', 'Crop wonder max p', '0.20', '150.00', '', '2026-06-27 06:13:28');

CREATE TABLE `fungicide_applications` (
  `id` int NOT NULL AUTO_INCREMENT,
  `planting_id` int NOT NULL,
  `application_date` date NOT NULL,
  `product_name` varchar(100) DEFAULT NULL,
  `quantity_liters` decimal(10,2) DEFAULT NULL,
  `total_cost` decimal(12,2) NOT NULL,
  `notes` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `planting_id` (`planting_id`),
  CONSTRAINT `fungicide_applications_ibfk_1` FOREIGN KEY (`planting_id`) REFERENCES `plantings` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `fungicide_applications` (`id`, `planting_id`, `application_date`, `product_name`, `quantity_liters`, `total_cost`, `notes`, `created_at`) VALUES
('11', '70', '2026-06-05', 'Zetagold', '1.00', '300.00', '', '2026-06-15 05:16:01'),
('12', '70', '2026-06-12', 'Zetagold', '1.00', '300.00', '', '2026-06-15 05:16:28'),
('14', '70', '2026-06-19', 'Zetagold', '0.20', '400.00', '', '2026-06-23 08:01:19'),
('15', '70', '2026-06-26', 'Zetagold', '0.50', '300.00', '', '2026-06-27 06:11:57'),
('16', '72', '2026-06-27', 'Zetagold', '0.20', '150.00', '', '2026-06-27 06:12:25'),
('17', '70', '2026-07-04', 'Zetagold', '0.20', '300.00', '', '2026-07-04 05:39:29'),
('18', '72', '2026-07-08', 'Zetagold', '0.20', '200.00', '', '2026-07-08 02:27:55'),
('19', '70', '2026-07-13', 'Zetagold', '0.20', '400.00', '', '2026-07-13 05:35:24'),
('20', '72', '2026-07-16', 'Zetagold', '0.20', '200.00', '', '2026-07-20 01:21:41'),
('21', '70', '2026-07-20', 'Zetagold', '0.20', '300.00', '', '2026-07-20 09:59:51');

CREATE TABLE `harvest_sales` (
  `id` int NOT NULL AUTO_INCREMENT,
  `planting_id` int NOT NULL,
  `harvest_date` date NOT NULL,
  `bags_harvested` decimal(10,2) NOT NULL,
  `price_per_bag` decimal(12,2) NOT NULL,
  `total_sales` decimal(12,2) NOT NULL,
  `notes` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `planting_id` (`planting_id`),
  CONSTRAINT `harvest_sales_ibfk_1` FOREIGN KEY (`planting_id`) REFERENCES `plantings` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

CREATE TABLE `harvested_lands` (
  `id` int NOT NULL AUTO_INCREMENT,
  `original_land_id` int NOT NULL,
  `land_name` varchar(100) NOT NULL,
  `size_acres` decimal(10,2) NOT NULL,
  `lease_price` decimal(12,2) NOT NULL,
  `lease_year` year NOT NULL,
  `planting_date` date DEFAULT NULL,
  `harvest_date` date NOT NULL,
  `total_cost` decimal(12,2) DEFAULT NULL,
  `total_sales` decimal(12,2) DEFAULT NULL,
  `profit_loss` decimal(12,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `harvested_lands` (`id`, `original_land_id`, `land_name`, `size_acres`, `lease_price`, `lease_year`, `planting_date`, `harvest_date`, `total_cost`, `total_sales`, `profit_loss`, `created_at`) VALUES
('1', '1', 'Sirikwa mark', '0.50', '12000.00', '2026', NULL, '2026-06-30', '32408.00', '0.00', '-32408.00', '2026-06-13 05:51:14'),
('2', '12', 'Mary', '1.00', '25000.00', '2026', NULL, '2026-06-10', '75700.00', '105000.00', '29300.00', '2026-06-13 14:31:19'),
('3', '16', 'Y', '6.00', '6.00', '2006', NULL, '2026-06-14', '110.00', '0.00', '-110.00', '2026-06-14 02:11:57'),
('4', '17', 'Kq', '5.00', '5.00', '2006', NULL, '2026-06-14', '14002.50', '52000.00', '37997.50', '2026-06-14 02:18:58'),
('5', '18', 'John', '0.50', '6000.00', '2026', NULL, '2026-06-14', '11800.00', '0.00', '-11800.00', '2026-06-14 02:24:22'),
('6', '20', 'John1', '2.00', '40000.00', '2002', NULL, '2026-06-14', '23342.00', '0.00', '-23342.00', '2026-06-14 02:30:48'),
('7', '21', 'M', '2.00', '9.00', '2006', NULL, '2026-06-14', '82.50', '0.00', '-82.50', '2026-06-14 02:41:11'),
('8', '19', 'John', '2.00', '6.00', '2023', NULL, '2026-06-14', '9203.00', '18.00', '-9185.00', '2026-06-14 02:43:28'),
('9', '22', 'Kinyanjui', '0.50', '1500.00', '2027', NULL, '2026-06-14', NULL, NULL, NULL, '2026-06-14 03:53:05'),
('10', '23', 'J', '0.25', '6000.00', '2026', NULL, '2026-06-14', '3019.00', '3300.00', '40281.00', '2026-06-14 09:03:31'),
('11', '24', 'Kim', '1.00', '25000.00', '0000', NULL, '2026-06-09', '42600.00', '159600.00', '129000.00', '2026-06-14 09:14:00'),
('12', '11', 'Dem (kwa cucu wa muthoni)', '0.20', '5000.00', '2026', NULL, '2026-06-09', '7381.00', '213440.00', '212059.00', '2026-06-14 09:27:23'),
('13', '25', 'Jj', '2.00', '8.00', '2008', NULL, '2026-06-09', '97.00', '30.00', '1557.00', '2026-06-14 09:36:19'),
('14', '26', 'Sample', '9999.00', '9999.00', '0000', NULL, '2026-06-09', '4742188.50', '100000.00', '-4622188.50', '2026-06-14 10:01:10'),
('15', '7', 'Kanyingi farm', '0.50', '1200.00', '2026', NULL, '2026-06-16', '18200.00', '150000.00', '191800.00', '2026-06-14 10:01:46'),
('16', '27', 'Kam', '562.00', '666.00', '0000', NULL, '2026-06-08', '1742037.00', '0.00', '-1682037.00', '2026-06-14 10:12:36'),
('17', '29', 'Njoeroge', '200.00', '200.00', '2000', NULL, '2026-06-01', '196115695.00', '0.00', '-196064295.00', '2026-06-14 10:30:24'),
('18', '28', 'Jambo', '200.00', '266.00', '0000', NULL, '2026-06-10', '22680781.00', '0.00', '-22014781.00', '2026-06-14 10:45:42'),
('19', '30', 'Mum', '6656.00', '666.00', '2066', NULL, '2026-06-08', '8886111.00', '663336.00', '-7622775.00', '2026-06-14 11:20:02'),
('20', '31', 'Jk', '20.00', '35.00', '2036', '2026-06-01', '0000-00-00', '121769.50', '60000.00', '-61769.50', '2026-06-14 11:38:03'),
('21', '32', 'Peter', '2.00', '30000.00', '2026', '2026-05-03', '2026-06-01', '127334.00', '180000.00', '52666.00', '2026-06-14 12:13:48'),
('22', '33', 'Kk', '2.00', '300.00', '2020', '2026-06-17', '2026-05-05', '242778.00', '136120.00', '-106658.00', '2026-06-14 12:22:22'),
('23', '34', 'Mk', '68.00', '66.00', '2066', '2026-06-02', '2026-06-14', '246017.00', '43956.00', '-202061.00', '2026-06-14 13:00:31'),
('24', '35', 'Jkl', '25.00', '555.00', '2022', '2026-06-01', '2026-06-09', '450782.50', '110544.00', '-340238.50', '2026-06-14 13:13:09'),
('25', '36', 'Kjn', '666.00', '66.00', '2066', '2026-06-01', '2026-06-08', '8085.00', '4356.00', '-3729.00', '2026-06-14 13:17:09'),
('26', '37', 'He', '66.00', '9.00', '2060', '2026-06-08', '2026-06-01', '64.50', '43758.00', '43693.50', '2026-06-14 13:33:40'),
('27', '36', 'Kjn', '666.00', '66.00', '2066', '2026-06-02', '2026-06-09', '49500.00', '2310.00', '-47190.00', '2026-06-14 13:35:31'),
('28', '38', 'Xyz', '258.00', '558.00', '2055', '2026-06-08', '2026-06-09', '11638.00', '172000.00', '160362.00', '2026-06-14 14:17:08'),
('29', '39', 'Joy', '0.50', '12500.00', '2028', '2026-06-01', '2026-06-08', '30472.00', '4356.00', '-26116.00', '2026-06-14 14:23:40'),
('30', '38', 'Xyz', '258.00', '558.00', '2055', '2026-06-08', '2026-06-09', '4704.00', '4356.00', '-348.00', '2026-06-14 14:34:59'),
('31', '39', 'Joy', '0.50', '12500.00', '2028', '2026-06-14', '2026-06-09', '454828.00', '443556.00', '-11272.00', '2026-06-14 14:40:35'),
('32', '40', 'Jacob', '65.00', '66.00', '2006', '2026-06-14', '2026-06-10', '10296.00', '4356.00', '-5940.00', '2026-06-14 14:44:21'),
('33', '41', 'Ruto', '1.00', '6000.00', '2023', '2026-05-10', '2026-06-09', '16200.00', '28900.00', '12700.00', '2026-06-14 14:48:39'),
('34', '41', 'Ruto', '1.00', '6000.00', '2023', '2026-06-10', '2026-06-10', '140622.00', '369630.00', '229008.00', '2026-06-14 14:53:51'),
('35', '42', 'TV', '666.00', '66.00', '0000', '2026-06-10', '2026-06-09', '6609.00', '65934.00', '59325.00', '2026-06-14 15:07:57'),
('36', '39', 'Joy', '0.50', '12500.00', '2028', '2026-06-09', '2026-06-10', '10630.00', '6534.00', '-4096.00', '2026-06-14 15:09:53'),
('37', '43', 'Timo', '66.00', '66.00', '2006', '2026-06-14', '2026-06-10', '831.00', '43956.00', '43125.00', '2026-06-14 15:19:05'),
('38', '44', 'Ken', '60.00', '200.00', '2006', '2026-06-09', '2026-06-01', '18898.00', '441936.00', '423038.00', '2026-06-14 15:29:07'),
('39', '45', 'Maiba', '55.00', '55.00', '2055', '2026-06-09', '2026-06-08', '596652.50', '51330.00', '-545322.50', '2026-06-14 15:35:47'),
('40', '46', 'Kaka', '555.00', '555.00', '0000', '2026-06-16', '2026-06-10', '3207.50', '308025.00', '304817.50', '2026-06-14 15:38:52'),
('41', '47', 'Musa', '25.00', '25.00', '2025', '2026-06-16', '2026-06-16', '1287.50', '1450.00', '162.50', '2026-06-14 15:43:47'),
('42', '48', 'Juli', '25.00', '25.00', '2022', '2026-06-16', '2026-06-16', '328156.50', '308025.00', '-20131.50', '2026-06-14 15:50:28'),
('43', '40', 'Jacob', '65.00', '66.00', '2006', '2026-06-14', '2026-06-16', '88.00', '2860.00', '2772.00', '2026-06-14 16:13:31'),
('44', '49', 'Paste', '22.00', '55.00', '2022', '2026-06-17', '2026-06-18', '171877.50', '73926.00', '-97951.50', '2026-06-14 16:21:03'),
('45', '50', 'Gachagua', '25.00', '55.00', '2056', '2026-06-10', '2026-06-17', '1765.50', '37290.00', '35524.50', '2026-06-14 16:54:54'),
('46', '49', 'Paste', '22.00', '55.00', '2022', '2026-06-09', '2026-06-09', '171429.50', '78000.00', '-93429.50', '2026-06-14 17:01:38'),
('47', '51', 'Jacob', '6.00', '66.00', '0000', '2026-06-15', '2026-06-10', '4422.00', '6666000.00', '6661578.00', '2026-06-15 03:27:43'),
('48', '8', 'Karima', '0.25', '5000.00', '2026', '2026-05-07', '2026-06-27', '14000.00', '4165140.00', '4151140.00', '2026-06-15 03:32:40'),
('49', '52', 'Bidan', '2.00', '25056.00', '0000', '2026-06-15', '2026-06-15', '1054551.00', '2178.00', '-1052373.00', '2026-06-15 03:41:01'),
('50', '53', 'Bimwa', '980.00', '996.00', '0000', '2026-06-01', '2026-06-15', '445476.00', '4356.00', '-441120.00', '2026-06-15 04:09:10'),
('51', '54', 'Maina', '1.00', '25000.00', '2026', '2026-03-11', '2026-06-10', '48400.00', '142500.00', '94100.00', '2026-06-15 05:10:51');

CREATE TABLE `herbicide_applications` (
  `id` int NOT NULL AUTO_INCREMENT,
  `planting_id` int NOT NULL,
  `application_date` date NOT NULL,
  `product_name` varchar(100) DEFAULT NULL,
  `quantity_liters` decimal(10,2) DEFAULT NULL,
  `total_cost` decimal(12,2) NOT NULL,
  `notes` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `planting_id` (`planting_id`),
  CONSTRAINT `herbicide_applications_ibfk_1` FOREIGN KEY (`planting_id`) REFERENCES `plantings` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `herbicide_applications` (`id`, `planting_id`, `application_date`, `product_name`, `quantity_liters`, `total_cost`, `notes`, `created_at`) VALUES
('5', '71', '2026-06-27', 'Kausha and moto plus', '0.20', '600.00', '', '2026-06-27 06:08:05'),
('6', '8', '2026-06-26', 'Kausha', '0.50', '600.00', '', '2026-06-27 06:08:47'),
('7', '72', '2026-06-27', 'Moto plus', '0.50', '250.00', '', '2026-06-27 06:09:24'),
('9', '73', '2026-07-16', 'Kausha', '0.20', '350.00', '', '2026-07-20 02:43:04'),
('10', '74', '2026-07-20', 'Kausha', '0.30', '300.00', '', '2026-07-20 10:01:37');

CREATE TABLE `houses` (
  `id` int NOT NULL AUTO_INCREMENT,
  `plot_id` int NOT NULL,
  `house_number` varchar(20) NOT NULL,
  `monthly_rent` decimal(10,2) NOT NULL,
  `water_rate_per_unit` decimal(10,2) DEFAULT '60.00',
  `status` enum('occupied','vacant','maintenance') DEFAULT 'vacant',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `plot_id` (`plot_id`),
  CONSTRAINT `houses_ibfk_1` FOREIGN KEY (`plot_id`) REFERENCES `plots` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `houses` (`id`, `plot_id`, `house_number`, `monthly_rent`, `water_rate_per_unit`, `status`, `created_at`) VALUES
('1', '1', 'House 1', '17000.00', '60.00', 'occupied', '2026-05-15 08:38:55'),
('3', '1', 'House 3', '18000.00', '60.00', 'occupied', '2026-05-15 08:38:55'),
('4', '2', 'House 6', '12000.00', '60.00', 'occupied', '2026-05-15 08:38:55'),
('5', '2', 'House 7', '12000.00', '60.00', 'vacant', '2026-05-15 08:38:55'),
('7', '2', 'House 1', '25000.00', '60.00', 'maintenance', '2026-05-15 11:44:48'),
('9', '4', 'A', '6000.00', '60.00', 'occupied', '2026-05-16 04:20:49'),
('10', '4', 'B', '6000.00', '60.00', 'occupied', '2026-05-16 04:21:14'),
('13', '5', 'A1', '7000.00', '60.00', 'maintenance', '2026-05-17 08:52:09'),
('14', '5', '22', '35000.00', '60.00', 'occupied', '2026-05-17 09:36:17');

CREATE TABLE `lands` (
  `id` int NOT NULL AUTO_INCREMENT,
  `land_name` varchar(100) NOT NULL,
  `size_acres` decimal(10,2) NOT NULL,
  `lease_price` decimal(12,2) NOT NULL,
  `lease_year` year NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `status` enum('active','harvested') DEFAULT 'active',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `lands` (`id`, `land_name`, `size_acres`, `lease_price`, `lease_year`, `created_at`, `status`) VALUES
('8', 'Karima', '0.25', '5000.00', '2026', '2026-06-13 10:02:31', 'active'),
('10', 'Katunda', '0.50', '12000.00', '2026', '2026-06-13 10:45:53', 'active'),
('55', 'Kanyingi', '0.50', '12000.00', '2026', '2026-06-15 05:21:03', 'active'),
('56', 'Dem', '0.20', '5000.00', '2026', '2026-06-15 05:42:52', 'active'),
('57', 'Ivone sirikwa', '0.50', '12500.00', '2026', '2026-06-17 03:18:01', 'active'),
('58', 'Charles kones', '0.80', '6000.00', '2026', '2026-06-23 09:28:16', 'active'),
('59', 'Mark sirikwa', '0.50', '12000.00', '2026', '2026-06-27 06:14:36', 'active'),
('60', 'Tabitha', '0.25', '6000.00', '2026', '2026-07-03 07:58:29', 'active');

CREATE TABLE `notification_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `planting_id` int NOT NULL,
  `notification_type` enum('weedicide','fungicide') NOT NULL,
  `target_date` date NOT NULL,
  `sent_at` timestamp NULL DEFAULT NULL,
  `status` enum('pending','sent','failed') DEFAULT 'pending',
  `sms_response` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_notification` (`planting_id`,`notification_type`),
  CONSTRAINT `notification_log_ibfk_1` FOREIGN KEY (`planting_id`) REFERENCES `plantings` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

CREATE TABLE `notifications` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_type` enum('admin','tenant') DEFAULT 'admin',
  `user_id` int NOT NULL,
  `message` text NOT NULL,
  `is_read` tinyint(1) DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `notifications` (`id`, `user_type`, `user_id`, `message`, `is_read`, `created_at`) VALUES
('6', 'admin', '0', 'Partial deposit of KSh 2000 received from tenant 9. Still needs KSh 10000', '1', '2026-05-17 13:08:51'),
('7', 'admin', '0', 'Tenant Peter kimani made payment of KSh 2000. balance is KSh 12,000.00 (overdue).', '1', '2026-05-17 13:08:51'),
('9', 'admin', '0', 'Partial deposit of KSh 6000 received from tenant 8. Still needs KSh 1000', '1', '2026-05-17 13:10:01'),
('10', 'admin', '0', 'Tenant James mwangi made payment of KSh 6000. balance is KSh 5,000.00 (overdue).', '1', '2026-05-17 13:10:01'),
('15', 'admin', '0', 'Partial deposit of KSh 5000 received from tenant 9. Still needs KSh 5000', '1', '2026-05-17 13:19:04'),
('16', 'admin', '0', 'Tenant Peter kimani made payment of KSh 5000. balance is KSh 12,000.00 (overdue).', '1', '2026-05-17 13:19:05'),
('20', 'admin', '0', 'Deposit of KSh 12000.00 fully paid by tenant 9 for house 12', '1', '2026-05-17 13:24:47'),
('21', 'admin', '0', 'Tenant Peter kimani made payment of KSh 5000. balance is KSh 12,000.00 (overdue).', '1', '2026-05-17 13:24:47'),
('22', 'admin', '0', 'Tenant Peter kimani made payment of KSh 6000. balance is KSh 6,000.00 (overdue).', '1', '2026-05-17 13:31:34'),
('23', 'admin', '0', 'Tenant Peter kimani made payment of KSh 5000. balance is KSh 1,000.00 (overdue).', '1', '2026-05-17 13:40:01'),
('24', 'admin', '0', 'Tenant Peter maina paid KSh 100 for Plot B - House 6. New balance: KSh -90,199.00', '1', '2026-05-20 01:21:07'),
('25', 'admin', '0', 'Tenant Mary wairimuB paid KSh 1000 for Tayari molo plot  - B. New balance: KSh -55,000.00', '1', '2026-05-24 05:41:37'),
('26', 'admin', '0', 'Tenant Mary wairimuB paid KSh 1000 for Tayari molo plot  - B. New balance: KSh -56,000.00', '1', '2026-05-24 05:43:48'),
('27', 'admin', '0', 'Tenant Peter maina paid KSh 1000 for Plot B - House 6. New balance: KSh -91,199.00', '1', '2026-05-30 03:39:59'),
('28', 'admin', '0', 'Tenant Bidan Mwangi  paid KSh 1000 for Plot A - House 1. New balance: KSh -5,630.00', '1', '2026-06-11 12:49:21'),
('29', 'admin', '0', 'Tenant Bidan Mwangi  paid KSh 10 for Plot A - House 1. New balance: KSh -5,640.00', '1', '2026-06-27 14:13:10'),
('30', 'admin', '0', 'Tenant Peter kamau paid KSh 20 for Plot B - House 7. New balance: KSh 11,980.00', '1', '2026-06-27 14:16:45');

CREATE TABLE `payments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tenant_id` int NOT NULL,
  `house_id` int NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `payment_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `transaction_id` varchar(100) DEFAULT NULL,
  `phone_number` varchar(15) DEFAULT NULL,
  `payment_method` enum('mpesa','cash','bank') DEFAULT 'mpesa',
  `status` enum('pending','completed','unmatched') DEFAULT 'completed',
  `notes` text,
  `recorded_by` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `transaction_id` (`transaction_id`),
  KEY `tenant_id` (`tenant_id`),
  KEY `house_id` (`house_id`),
  CONSTRAINT `payments_ibfk_1` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE,
  CONSTRAINT `payments_ibfk_2` FOREIGN KEY (`house_id`) REFERENCES `houses` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=500 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `payments` (`id`, `tenant_id`, `house_id`, `amount`, `payment_date`, `transaction_id`, `phone_number`, `payment_method`, `status`, `notes`, `recorded_by`) VALUES
('50', '14', '9', '2000.00', '2026-05-18 02:25:17', 'Tgh', NULL, 'mpesa', 'completed', NULL, NULL),
('51', '15', '10', '60000.00', '2026-05-18 02:25:47', 'Gh', NULL, 'mpesa', 'completed', NULL, NULL),
('52', '14', '9', '1000.00', '2026-05-18 12:06:13', 'Hj ', NULL, 'mpesa', 'completed', NULL, NULL),
('53', '11', '1', '65.00', '2026-05-18 12:37:38', 'Y', NULL, 'mpesa', 'completed', NULL, NULL),
('54', '11', '1', '50.00', '2026-05-18 12:44:31', 'Ty', NULL, 'mpesa', 'completed', NULL, NULL),
('55', '11', '1', '2000.00', '2026-05-18 13:13:38', 'Hhh', NULL, 'mpesa', 'completed', NULL, NULL),
('56', '11', '1', '2580.00', '2026-05-18 13:25:31', 'Ghg', NULL, 'mpesa', 'completed', NULL, NULL),
('57', '11', '1', '600.00', '2026-05-18 13:29:15', 'Tt', NULL, 'mpesa', 'completed', NULL, NULL),
('58', '13', '4', '20000.00', '2026-05-18 13:48:20', 'St', NULL, 'mpesa', 'completed', NULL, NULL),
('59', '13', '4', '23000.00', '2026-05-18 13:49:52', 'Xty', NULL, 'mpesa', 'completed', NULL, NULL),
('60', '14', '9', '2855.00', '2026-05-18 13:54:53', 'Ggy', NULL, 'mpesa', 'completed', NULL, NULL),
('61', '11', '1', '5000.00', '2026-05-18 14:05:11', 'Rty', NULL, 'mpesa', 'completed', NULL, NULL),
('62', '13', '4', '2300.00', '2026-05-18 14:05:57', 'Gyu', NULL, 'mpesa', 'completed', NULL, NULL),
('63', '13', '4', '25000.00', '2026-05-18 14:08:21', 'Fgggf Jenn', NULL, 'mpesa', 'completed', NULL, NULL),
('64', '13', '4', '2500.00', '2026-05-18 14:09:24', 'Ryd', NULL, 'mpesa', 'completed', NULL, NULL),
('65', '14', '9', '2500.00', '2026-05-18 14:11:50', 'Gj', NULL, 'mpesa', 'completed', NULL, NULL),
('67', '13', '4', '255.00', '2026-05-18 14:35:13', 'Yts', NULL, 'mpesa', 'completed', NULL, NULL),
('68', '14', '9', '200.00', '2026-05-18 14:36:24', 'Hhhh', NULL, 'mpesa', 'completed', NULL, NULL),
('69', '11', '1', '2300.00', '2026-05-18 14:52:53', 'Fggg', NULL, 'mpesa', 'completed', NULL, NULL),
('70', '14', '9', '2588.00', '2026-05-18 14:53:17', 'Rgg', NULL, 'mpesa', 'completed', NULL, NULL),
('73', '13', '4', '25562.00', '2026-05-18 14:53:55', 'Fgggf', NULL, 'mpesa', 'completed', NULL, NULL),
('74', '14', '9', '230.00', '2026-05-18 14:59:29', 'Dfd', NULL, 'mpesa', 'completed', NULL, NULL),
('75', '11', '1', '250.00', '2026-05-18 14:59:57', 'Dff', NULL, 'mpesa', 'completed', NULL, NULL),
('76', '13', '4', '63.00', '2026-05-18 15:00:27', 'Xvb', NULL, 'mpesa', 'completed', NULL, NULL),
('77', '11', '1', '5681.00', '2026-05-18 15:18:55', 'Rtd', NULL, 'mpesa', 'completed', NULL, NULL),
('79', '13', '4', '2300.00', '2026-05-18 15:20:00', 'Dfy', NULL, 'mpesa', 'completed', NULL, NULL),
('81', '14', '9', '356.00', '2026-05-18 15:20:43', 'Ttt', NULL, 'mpesa', 'completed', NULL, NULL),
('82', '14', '9', '1000.00', '2026-05-18 23:24:52', 'Thj', NULL, 'mpesa', 'completed', NULL, NULL),
('83', '14', '9', '25.00', '2026-05-18 23:36:49', 'Vbh', NULL, 'mpesa', 'completed', NULL, NULL),
('84', '13', '4', '200.00', '2026-05-18 23:37:17', 'Hgh', NULL, 'mpesa', 'completed', NULL, NULL),
('85', '11', '1', '100.00', '2026-05-19 00:17:20', 'Ggggg', NULL, 'mpesa', 'completed', NULL, NULL),
('86', '13', '4', '100.00', '2026-05-19 00:17:46', 'Yxh', NULL, 'mpesa', 'completed', NULL, NULL),
('87', '14', '9', '250.00', '2026-05-19 00:18:11', 'Ehxh', NULL, 'mpesa', 'completed', NULL, NULL),
('88', '11', '1', '1000.00', '2026-05-19 01:39:53', 'Hsdh', NULL, 'mpesa', 'completed', NULL, NULL),
('89', '14', '9', '1000.00', '2026-05-19 01:41:11', 'Rd', NULL, 'mpesa', 'completed', NULL, NULL),
('90', '11', '1', '100.00', '2026-05-19 01:42:04', 'Ghb', NULL, 'mpesa', 'completed', NULL, NULL),
('91', '11', '1', '23.00', '2026-05-19 02:18:38', 'Bzj', NULL, 'mpesa', 'completed', NULL, NULL),
('92', '13', '4', '50.00', '2026-05-19 02:19:29', 'Ggh', NULL, 'mpesa', 'completed', NULL, NULL),
('93', '13', '4', '53.00', '2026-05-19 02:23:31', 'Ghhf', NULL, 'mpesa', 'completed', NULL, NULL),
('94', '13', '4', '235.00', '2026-05-19 02:25:58', 'Ghh', NULL, 'mpesa', 'completed', NULL, NULL),
('95', '11', '1', '300.00', '2026-05-19 02:26:18', 'Hjj', NULL, 'mpesa', 'completed', NULL, NULL),
('96', '11', '1', '123.00', '2026-05-19 02:35:50', 'Tcd', NULL, 'mpesa', 'completed', NULL, NULL),
('99', '13', '4', '236.00', '2026-05-19 02:36:42', 'Ghhfe', NULL, 'mpesa', 'completed', NULL, NULL),
('100', '11', '1', '358.00', '2026-05-19 02:57:40', 'Ghhahh', NULL, 'mpesa', 'completed', NULL, NULL),
('101', '13', '4', '10.00', '2026-05-19 21:31:21', 'Kge', NULL, 'mpesa', 'completed', NULL, NULL),
('102', '11', '1', '100.00', '2026-05-19 21:32:12', 'Kgf', NULL, 'mpesa', 'completed', NULL, NULL),
('103', '14', '9', '562.00', '2026-05-19 21:45:45', 'Thdf', NULL, 'mpesa', 'completed', NULL, NULL),
('104', '13', '4', '100.00', '2026-05-20 01:21:07', 'Hfxv', NULL, 'mpesa', 'completed', NULL, NULL),
('109', '11', '14', '1000.00', '2026-05-18 02:23:32', '', NULL, 'mpesa', 'completed', NULL, NULL),
('491', '13', '4', '235.00', '2026-05-18 02:24:50', 'Zi', NULL, 'mpesa', 'completed', NULL, NULL),
('493', '15', '10', '1000.00', '2026-05-24 05:41:37', 'Jsnsh', NULL, 'mpesa', 'completed', NULL, NULL),
('494', '15', '10', '1000.00', '2026-05-24 05:43:48', 'Jssh', NULL, 'mpesa', 'completed', NULL, NULL),
('495', '13', '4', '1000.00', '2026-05-30 03:39:59', 'Ndbxbx', NULL, 'mpesa', 'completed', NULL, NULL),
('496', '11', '1', '1000.00', '2026-06-11 12:49:21', 'Hhdhd', NULL, 'mpesa', 'completed', NULL, NULL),
('497', '11', '1', '10.00', '2026-06-27 14:13:10', 'Xff', NULL, 'mpesa', 'completed', NULL, NULL),
('498', '17', '5', '20.00', '2026-06-27 14:16:45', 'Gchh', NULL, 'mpesa', 'completed', NULL, NULL),
('499', '17', '5', '12000.00', '2026-06-28 08:07:19', 'DEPOSIT_REFUND', NULL, 'mpesa', 'completed', 'Full deposit refund after vacating', NULL);

CREATE TABLE `plantings` (
  `id` int NOT NULL AUTO_INCREMENT,
  `land_id` int NOT NULL,
  `planting_date` date NOT NULL,
  `seed_amount_kg` decimal(10,2) NOT NULL,
  `seed_price_per_kg` decimal(10,2) NOT NULL,
  `fertilizer_used_kg` decimal(10,2) NOT NULL,
  `fertilizer_price_per_50kg` decimal(10,2) NOT NULL,
  `labor_cost` decimal(12,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `germination_status` enum('pending','on_time','delayed') NOT NULL DEFAULT 'pending',
  `germination_delay_marked_date` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `land_id` (`land_id`),
  CONSTRAINT `plantings_ibfk_1` FOREIGN KEY (`land_id`) REFERENCES `lands` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `plantings` (`id`, `land_id`, `planting_date`, `seed_amount_kg`, `seed_price_per_kg`, `fertilizer_used_kg`, `fertilizer_price_per_50kg`, `labor_cost`, `created_at`, `germination_status`, `germination_delay_marked_date`) VALUES
('8', '10', '2026-06-01', '3.50', '3000.00', '2.00', '3000.00', '2100.00', '2026-06-13 10:48:40', 'delayed', '2026-07-20'),
('70', '8', '2026-05-07', '2.00', '3500.00', '1.00', '3000.00', '1200.00', '2026-06-15 05:12:44', 'on_time', NULL),
('71', '55', '2026-06-10', '4.00', '3000.00', '2.00', '3000.00', '1800.00', '2026-06-15 05:22:57', 'delayed', '2026-07-20'),
('72', '56', '2026-05-23', '1.50', '3500.00', '1.00', '3000.00', '900.00', '2026-06-15 05:43:55', 'on_time', NULL),
('73', '60', '2026-07-01', '1.50', '2500.00', '1.00', '3000.00', '1400.00', '2026-07-03 07:59:51', 'pending', NULL),
('74', '58', '2026-07-06', '3.00', '2500.00', '1.00', '3000.00', '2600.00', '2026-07-07 06:33:27', 'pending', NULL),
('75', '59', '2026-07-07', '4.00', '2500.00', '2.00', '3000.00', '2100.00', '2026-07-07 06:35:24', 'pending', NULL),
('76', '57', '2026-07-14', '3.30', '3000.00', '2.00', '3250.00', '1800.00', '2026-07-14 10:49:30', 'pending', NULL);

CREATE TABLE `plots` (
  `id` int NOT NULL AUTO_INCREMENT,
  `plot_name` varchar(50) NOT NULL,
  `description` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `plot_name` (`plot_name`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `plots` (`id`, `plot_name`, `description`, `created_at`) VALUES
('1', 'Plot A', 'Kaheho', '2026-05-15 08:38:55'),
('2', 'Plot B', 'Back side', '2026-05-15 08:38:55'),
('4', 'Tayari molo plot ', '', '2026-05-16 04:20:05'),
('5', 'NJONJO Tents', 'Bedsitter', '2026-05-17 07:58:07');

CREATE TABLE `potato_photos` (
  `id` int NOT NULL AUTO_INCREMENT,
  `planting_id` int NOT NULL,
  `land_id` int NOT NULL,
  `photo_path` varchar(255) NOT NULL,
  `date_taken` date NOT NULL,
  `uploaded_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_planting` (`planting_id`),
  KEY `idx_land` (`land_id`)
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `potato_photos` (`id`, `planting_id`, `land_id`, `photo_path`, `date_taken`, `uploaded_at`) VALUES
('29', '70', '8', '/potato_uploads/potato_photos/potato_6a5dfb7fca6d60.43134754.jpg', '2026-07-20', '2026-07-20 06:42:09'),
('30', '70', '8', '/potato_uploads/potato_photos/potato_6a5dfbaf00c341.51507339.jpg', '2026-07-20', '2026-07-20 06:42:57'),
('31', '70', '8', '/potato_uploads/potato_photos/potato_6a5dfbdb2b93f6.09675817.jpg', '2026-07-20', '2026-07-20 06:43:40'),
('32', '70', '8', '/potato_uploads/potato_photos/potato_6a5dfc12ae6ac3.92049768.jpg', '2026-07-20', '2026-07-20 06:44:36'),
('33', '70', '8', '/potato_uploads/potato_photos/potato_6a5dfe26e208a9.19541404.jpg', '2026-07-20', '2026-07-20 06:53:28'),
('34', '71', '55', '/potato_uploads/potato_photos/potato_6a5e41e4ed1515.87408636.jpg', '2026-07-20', '2026-07-20 11:42:30'),
('35', '71', '55', '/potato_uploads/potato_photos/potato_6a5e421e3e4942.13648085.jpg', '2026-07-20', '2026-07-20 11:43:27'),
('37', '8', '10', '/potato_uploads/potato_photos/potato_6a607f8ef2f261.14404303.jpg', '2026-07-22', '2026-07-22 04:30:08'),
('40', '71', '55', '/potato_uploads/potato_photos/potato_6a60d93c852eb1.14091084.jpg', '2026-07-22', '2026-07-22 10:52:45');

CREATE TABLE `seed_recovery` (
  `id` int NOT NULL AUTO_INCREMENT,
  `planting_id` int NOT NULL,
  `recovery_date` date NOT NULL,
  `bags_remaining` decimal(10,2) NOT NULL,
  `current_seed_price` decimal(12,2) NOT NULL,
  `total_value` decimal(12,2) NOT NULL,
  `notes` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `planting_id` (`planting_id`),
  CONSTRAINT `seed_recovery_ibfk_1` FOREIGN KEY (`planting_id`) REFERENCES `plantings` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

CREATE TABLE `sms_archive` (
  `id` int NOT NULL AUTO_INCREMENT,
  `recipient_phone` varchar(20) NOT NULL,
  `message` text NOT NULL,
  `status` enum('sent','failed') NOT NULL,
  `attempts` int DEFAULT '0',
  `sent_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `sms_archive` (`id`, `recipient_phone`, `message`, `status`, `attempts`, `sent_at`) VALUES
('1', '254713132531', 'Dear Bidan Mwangi , we received your rent payment of KSh 123 for Plot A - House 1. Your new balance is KSh -4,172.00', 'failed', '5', '2026-05-19 02:39:04'),
('2', '254713132531', 'Tenant Bidan Mwangi  paid KSh 123 for Plot A - House 1. New balance: KSh -4,172.00', 'failed', '5', '2026-05-19 02:39:04'),
('3', '254746508450', 'Dear Peter maina, we received your rent payment of KSh 236 for Plot B - House 6. Your new balance is KSh -90,089.00', 'failed', '5', '2026-05-19 02:40:04'),
('4', '254713132531', 'Tenant Peter maina paid KSh 236 for Plot B - House 6. New balance: KSh -90,089.00', 'failed', '5', '2026-05-19 02:40:04'),
('5', '254713132531', 'Dear Bidan Mwangi , we received your rent payment of KSh 358 for Plot A - House 1. Your new balance is KSh -4,530.00', 'failed', '5', '2026-05-19 03:01:06'),
('6', '254713132531', 'Tenant Bidan Mwangi  paid KSh 358 for Plot A - House 1. New balance: KSh -4,530.00', 'failed', '5', '2026-05-19 03:01:08'),
('7', '254746508450', 'Dear Peter maina, we received your rent payment of KSh 10 for Plot B - House 6. Your new balance is KSh -90,099.00', 'sent', '1', '2026-05-19 21:32:04'),
('8', '254713132531', 'Tenant Peter maina paid KSh 10 for Plot B - House 6. New balance: KSh -90,099.00', 'sent', '1', '2026-05-19 21:32:05'),
('9', '254713132531', 'Dear Bidan Mwangi , we received your rent payment of KSh 100 for Plot A - House 1. Your new balance is KSh -4,630.00', 'sent', '1', '2026-05-19 21:33:04'),
('10', '254713132531', 'Tenant Bidan Mwangi  paid KSh 100 for Plot A - House 1. New balance: KSh -4,630.00', 'sent', '1', '2026-05-19 21:33:04'),
('11', '254719119493', 'Dear Mary wairimu, we received your rent payment of KSh 562 for Tayari molo plot  - A. Your new balance is KSh -8,566.00', 'sent', '1', '2026-05-19 21:46:04'),
('12', '254713132531', 'Tenant Mary wairimu paid KSh 562 for Tayari molo plot  - A. New balance: KSh -8,566.00', 'sent', '1', '2026-05-19 21:46:04'),
('13', '254746508450', 'Dear Peter maina, we received your rent payment of KSh 100 for Plot B - House 6. Your new balance is KSh -90,199.00', 'sent', '1', '2026-05-20 01:22:04'),
('14', '254731670424', 'Dear Mary wairimuB, we received your rent payment of KSh 1000 for Tayari molo plot  - B. Your new balance is KSh -55,000.00', 'sent', '1', '2026-05-24 05:42:04'),
('15', '254731670424', 'Dear Mary wairimuB, we received your rent payment of KSh 1000 for Tayari molo plot  - B. Your new balance is KSh -56,000.00', 'sent', '1', '2026-05-24 05:44:04'),
('16', '254746508450', 'Dear Peter maina, we received your rent payment of KSh 1000 for Plot B - House 6. Your new balance is KSh -91,199.00', 'sent', '1', '2026-05-30 03:40:05'),
('17', '254713132531', 'Dear Bidan Mwangi , we received your rent payment of KSh 1000 for Plot A - House 1. Your new balance is KSh -5,630.00', 'failed', '5', '2026-06-11 12:54:04'),
('18', '254713132531', 'Dear Bidan Mwangi , we received your rent payment of KSh 10 for Plot A - House 1. Your new balance is KSh -5,640.00', 'failed', '5', '2026-06-27 14:18:04'),
('19', '254719119493', 'Dear Peter kamau, we received your rent payment of KSh 20 for Plot B - House 7. Your new balance is KSh 11,980.00', 'failed', '5', '2026-06-27 14:21:04');

CREATE TABLE `sms_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `phone` varchar(15) DEFAULT NULL,
  `message` text,
  `status` varchar(20) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

CREATE TABLE `sms_queue` (
  `id` int NOT NULL AUTO_INCREMENT,
  `recipient_phone` varchar(20) NOT NULL,
  `message` text NOT NULL,
  `attempts` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

CREATE TABLE `tenant_houses` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tenant_id` int NOT NULL,
  `house_id` int NOT NULL,
  `move_in_date` date DEFAULT (curdate()),
  `move_out_date` date DEFAULT NULL,
  `is_current` tinyint(1) DEFAULT '1',
  `deposit_paid` tinyint(1) DEFAULT '0',
  `deposit_amount` decimal(10,2) DEFAULT '0.00',
  `expected_vacate_date` date DEFAULT NULL,
  `vacate_notification_sent` tinyint(1) DEFAULT '0',
  `last_rent_billed_date` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `tenant_id` (`tenant_id`),
  KEY `house_id` (`house_id`),
  CONSTRAINT `tenant_houses_ibfk_1` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE,
  CONSTRAINT `tenant_houses_ibfk_2` FOREIGN KEY (`house_id`) REFERENCES `houses` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `tenant_houses` (`id`, `tenant_id`, `house_id`, `move_in_date`, `move_out_date`, `is_current`, `deposit_paid`, `deposit_amount`, `expected_vacate_date`, `vacate_notification_sent`, `last_rent_billed_date`) VALUES
('10', '11', '1', '2026-05-18', NULL, '1', '0', '0.00', NULL, '0', NULL),
('12', '13', '4', '2026-05-18', NULL, '1', '0', '0.00', NULL, '0', NULL),
('13', '14', '9', '2026-05-18', NULL, '1', '0', '0.00', NULL, '0', NULL),
('14', '15', '10', '2026-05-18', NULL, '1', '0', '0.00', NULL, '0', NULL),
('15', '16', '14', '2026-06-11', NULL, '1', '0', '0.00', NULL, '0', NULL),
('16', '17', '5', '2026-06-27', '2026-06-28', '0', '0', '0.00', NULL, '0', NULL);

CREATE TABLE `tenant_phones` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tenant_id` int NOT NULL,
  `phone_number` varchar(15) NOT NULL,
  `is_primary` tinyint(1) DEFAULT '0',
  `description` varchar(100) DEFAULT NULL,
  `added_by` varchar(50) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `tenant_id` (`tenant_id`),
  CONSTRAINT `tenant_phones_ibfk_1` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `tenant_phones` (`id`, `tenant_id`, `phone_number`, `is_primary`, `description`, `added_by`, `created_at`) VALUES
('31', '14', '254719119493', '1', '', NULL, '2026-05-18 23:23:36'),
('32', '11', '254713132531', '0', '', NULL, '2026-05-19 00:16:32'),
('37', '15', '254713132531', '0', 'E', NULL, '2026-05-24 05:43:04'),
('38', '13', '254746508450', '1', '', NULL, '2026-05-24 08:42:14'),
('49', '16', '0713132531', '1', NULL, NULL, '2026-06-11 12:47:37'),
('57', '17', '0719119493', '1', NULL, NULL, '2026-06-27 14:15:20');

CREATE TABLE `tenants` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `id_number` varchar(20) NOT NULL,
  `phone` varchar(15) NOT NULL,
  `email` varchar(100) DEFAULT NULL,
  `gender` enum('Male','Female','Other') DEFAULT 'Male',
  `tenant_photo` varchar(255) DEFAULT NULL,
  `id_photo` varchar(255) DEFAULT NULL,
  `current_water_reading` decimal(10,2) DEFAULT '0.00',
  `last_water_reading_date` date DEFAULT NULL,
  `status` enum('active','inactive','evicted') DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_number` (`id_number`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `tenants` (`id`, `name`, `id_number`, `phone`, `email`, `gender`, `tenant_photo`, `id_photo`, `current_water_reading`, `last_water_reading_date`, `status`, `created_at`) VALUES
('11', 'Bidan Mwangi ', '30476271', '0713132531', NULL, 'Male', NULL, NULL, '0.00', NULL, 'active', '2026-05-18 02:20:42'),
('13', 'Peter maina', '438', '0746508450', NULL, 'Male', NULL, NULL, '0.00', NULL, 'active', '2026-05-18 02:21:50'),
('14', 'Mary wairimu', '20734522', '0719119493', NULL, 'Male', NULL, NULL, '0.00', NULL, 'active', '2026-05-18 02:22:27'),
('15', 'Mary wairimuB', '30452728', '0731670424', NULL, 'Male', NULL, NULL, '0.00', NULL, 'active', '2026-05-18 02:23:10'),
('16', 'James Macharia', '30304683', '0713132531', NULL, 'Male', NULL, NULL, '0.00', NULL, 'active', '2026-06-11 12:47:37'),
('17', 'Peter kamau', '46&', '0719119493', NULL, 'Male', NULL, NULL, '0.00', NULL, 'inactive', '2026-06-27 14:15:20');

CREATE TABLE `topdressing` (
  `id` int NOT NULL AUTO_INCREMENT,
  `planting_id` int NOT NULL,
  `application_date` date NOT NULL,
  `bags_used` decimal(10,2) NOT NULL,
  `price_per_bag` decimal(12,2) NOT NULL,
  `total_cost` decimal(12,2) NOT NULL,
  `notes` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `planting_id` (`planting_id`),
  CONSTRAINT `topdressing_ibfk_1` FOREIGN KEY (`planting_id`) REFERENCES `plantings` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `topdressing` (`id`, `planting_id`, `application_date`, `bags_used`, `price_per_bag`, `total_cost`, `notes`, `created_at`) VALUES
('7', '70', '2026-07-01', '1.00', '3000.00', '3000.00', 'Mavuno planting', '2026-07-01 13:08:47'),
('8', '72', '2026-07-03', '1.00', '2500.00', '2500.00', 'Mavuno planting', '2026-07-03 07:55:37');

CREATE TABLE `unmatched_payments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `transaction_id` varchar(100) DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `phone_number` varchar(15) DEFAULT NULL,
  `payment_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `status` enum('pending','resolved','ignored') DEFAULT 'pending',
  `resolved_by` int DEFAULT NULL,
  `resolved_at` timestamp NULL DEFAULT NULL,
  `notes` text,
  `payer_name` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `transaction_id` (`transaction_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

CREATE TABLE `users` (
  `id` int NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

INSERT INTO `users` (`id`, `username`, `password_hash`, `created_at`) VALUES
('1', 'admin', '$2y$10$OF4GQ2iprSG4Eo8Wd6Ksxewm6DrjEa4lmrY7iEH/SeIJrITdKq.ri', '2026-07-04 05:11:41');

CREATE TABLE `water_bills` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tenant_id` int NOT NULL,
  `house_id` int NOT NULL,
  `billing_month` date NOT NULL,
  `previous_reading` decimal(10,2) DEFAULT '0.00',
  `current_reading` decimal(10,2) DEFAULT '0.00',
  `units_consumed` decimal(10,2) DEFAULT '0.00',
  `rate_per_unit` decimal(10,2) DEFAULT '60.00',
  `amount` decimal(10,2) DEFAULT '0.00',
  `status` enum('pending','paid','partial') DEFAULT 'pending',
  `payment_date` timestamp NULL DEFAULT NULL,
  `payment_amount` decimal(10,2) DEFAULT '0.00',
  `notes` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `tenant_id` (`tenant_id`),
  KEY `house_id` (`house_id`),
  CONSTRAINT `water_bills_ibfk_1` FOREIGN KEY (`tenant_id`) REFERENCES `tenants` (`id`) ON DELETE CASCADE,
  CONSTRAINT `water_bills_ibfk_2` FOREIGN KEY (`house_id`) REFERENCES `houses` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

