CREATE TABLE reservation_revenue (
  idReservation           INT             NOT NULL,
  idEntityCompany         INT             NOT NULL,
  marketSegmentId         INT             NULL,
  marketSegmentName       VARCHAR(100)    NULL,
  idReservationChannel    VARCHAR(50)     NULL,
  nameChannel             VARCHAR(100)    NULL,
  purposeStayId           INT             NULL,
  purpose                 VARCHAR(100)    NULL,
  managerID               VARCHAR(50)     NULL,
  managerName             VARCHAR(100)    NULL,
  PRIMARY KEY (idReservation, idEntityCompany),
  FOREIGN KEY (idReservation, idEntityCompany)
    REFERENCES reservation_details(idReservation, idEntityCompany)
    ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
