CREATE TABLE IF NOT EXISTS `OfferRequests` (
  `ID` INT NOT NULL AUTO_INCREMENT,
  `CustName` VARCHAR(255) NOT NULL,
  `City` VARCHAR(120) NOT NULL,
  `Delegate` VARCHAR(150) NOT NULL,
  `Date` DATE NOT NULL,
  `Spri` VARCHAR(120) NULL,
  `Emerg` VARCHAR(60) NULL,
  `OwnerPhone` VARCHAR(30) NOT NULL,
  `Places` TEXT NULL,
  `Amount` BIGINT NULL,
  `Kst` BIGINT NULL,
  `Note` TEXT NULL,
  `EnteredByUserId` INT NULL,
  `ConvertedOfferID` INT NULL,
  `ConvertedAt` DATETIME NULL,
  `ApprovedBy1` VARCHAR(255) NULL,
  `ApprovedBy2` VARCHAR(255) NULL,
  `UpdateDate` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`),
  KEY `idx_offer_requests_date` (`Date`),
  KEY `idx_offer_requests_delegate` (`Delegate`),
  KEY `idx_offer_requests_entered` (`EnteredByUserId`),
  KEY `idx_offer_requests_converted_offer` (`ConvertedOfferID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
