CREATE TABLE `io_ro` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `advertiser_id` int(11) NOT NULL,
  `billing_address` varchar(255) NOT NULL,
  `billing_city` varchar(255) NOT NULL,
  `billing_state` varchar(255) NOT NULL,
  `billing_country` varchar(64) NOT NULL,
  `billing_pin_code` varchar(10) NOT NULL,
  `contact_email` varchar(64) NOT NULL,
  `billing_milestone` varchar(64) NOT NULL,
  `payment_terms` varchar(64) NOT NULL,
  `billing_data_source` varchar(64) NOT NULL,
  `billing_currency` char(3) NOT NULL,
  `budget` float NOT NULL,
  `discount` float NOT NULL,
  `daily_budget` float NOT NULL,
  `sales_manager_name` varchar(64) NOT NULL,
  `sales_manager_phone` varchar(64) NOT NULL,
  `sales_manager_email` varchar(64) NOT NULL,
  `campaign_manager_name` varchar(64) NOT NULL,
  `campaign_manager_phone` varchar(64) NOT NULL,
  `campaign_manager_email` varchar(64) NOT NULL,
  `io_date` date NOT NULL,
  `io_status` tinyint(4) NOT NULL DEFAULT '0',
  `io_insert_datetime` datetime NOT NULL,
  `ro_date` date NOT NULL,
  `ro_status` tinyint(4) NOT NULL DEFAULT '0',
  `ro_insert_datetime` datetime NOT NULL,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `signed_io_file_name` varchar(255) NOT NULL,
  `signed_ro_file_name` varchar(255) NOT NULL,
  `placement_name` varchar(64) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `targeting` varchar(512) NOT NULL,
  `ad_format` varchar(255) NOT NULL,
  `pricing_type` enum('CPC','CPA') DEFAULT 'CPC',
  `price` float NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
);

