-- Place your SQL code here
CREATE TABLE `vn`.`negativeOrigin` (
  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  `itemFk` INT NOT NULL,
  `type` ENUM('FALTAS', 'CONTENEDOR', 'ENTRADAS', 'OVERBOOKING') NOT NULL,
  `dated` DATE DEFAULT CURRENT_DATE,
  `quantity` DECIMAL(10,2) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_constraint` (`itemFk`, `type`, `dated`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
