CREATE TABLE reservation_room_requirements (
  idReservation     INT             NOT NULL,
  idEntityCompany   INT             NOT NULL,
  room_index        TINYINT UNSIGNED NOT NULL,   -- posição de rooms[*]
  req_index         TINYINT UNSIGNED NOT NULL,   -- posição de requirementReservation[*]
  requirement       JSON            NULL,         -- objeto completo do requisito
  PRIMARY KEY (idReservation, idEntityCompany, room_index, req_index),
  FOREIGN KEY (idReservation, idEntityCompany)
    REFERENCES reservation_rooms(idReservation, idEntityCompany)
    ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
