CREATE TABLE `partner_amperage_ledger` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `partner_id` int(10) unsigned NOT NULL COMMENT 'Customer ID (partner type)',
  `type` enum('delivery','return','adjustment') NOT NULL COMMENT 'Transaction type',
  `category_id` int(10) unsigned NULL DEFAULT NULL COMMENT 'Product category',
  `amperage` int(10) NOT NULL DEFAULT 0 COMMENT 'Ampere amount (positive = delivered, negative = returned)',
  `quantity` int(10) unsigned NOT NULL DEFAULT 1 COMMENT 'Number of units',
  `description` varchar(500) NOT NULL DEFAULT '',
  `created_by` int(10) unsigned NULL DEFAULT NULL COMMENT 'Admin user ID',
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_partner_id` (`partner_id`),
  KEY `idx_category_id` (`category_id`),
  KEY `idx_type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
