CREATE TABLE `sivir_sell_sold_lot_used` (
  `relative` varchar(50) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL COMMENT 'The UUID',
  `users_sid` varchar(50) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL COMMENT 'Related to users table',
  `global_branch_office_id` varchar(50) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL COMMENT 'Related to branch office table',
  `sell_id` bigint NOT NULL COMMENT 'related to sivir_sell table	',
  `product_id` varchar(50) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL COMMENT 'related to product table',
  `product_lot_id` varchar(50) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL COMMENT 'Related to sivir_products_lot table',
  `lot` varchar(50) CHARACTER SET latin1 COLLATE latin1_general_ci DEFAULT NULL COMMENT 'The lot number or data',
  `quantity` decimal(15,5) NOT NULL COMMENT 'The lot quantity used',
  `status` enum('A','X') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'A',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `sivir_sell_sold_lot_used`
--
ALTER TABLE `sivir_sell_sold_lot_used`
  ADD PRIMARY KEY (`relative`);
