-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 24, 2020 at 03:33 PM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.8

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `imo-farid`
--

-- --------------------------------------------------------

--
-- Table structure for table `domains`
--

CREATE TABLE `domains` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `master` varchar(128) DEFAULT NULL,
  `last_check` int(11) DEFAULT NULL,
  `type` varchar(6) NOT NULL,
  `notified_serial` int(10) UNSIGNED DEFAULT NULL,
  `account` varchar(40) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `gen_link`
--

CREATE TABLE `gen_link` (
  `id` bigint(20) NOT NULL,
  `sub` varchar(12) NOT NULL,
  `domain` varchar(32) NOT NULL,
  `hash` varchar(64) NOT NULL,
  `forward_url` varchar(128) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `lead_report`
--

CREATE TABLE `lead_report` (
  `id` int(11) NOT NULL,
  `date` date NOT NULL,
  `click_id` bigint(20) NOT NULL,
  `token_1` varchar(12) NOT NULL,
  `token_2` varchar(12) NOT NULL,
  `traffic_type` varchar(12) NOT NULL,
  `country` varchar(4) NOT NULL,
  `currency_symbol` varchar(4) NOT NULL,
  `payout` double NOT NULL,
  `carrier` varchar(16) NOT NULL,
  `os` varchar(16) NOT NULL,
  `connection_type` varchar(16) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `link_report`
--

CREATE TABLE `link_report` (
  `id` bigint(20) NOT NULL,
  `date` date NOT NULL,
  `name` varchar(32) NOT NULL,
  `country` varchar(16) NOT NULL,
  `vertical` varchar(16) NOT NULL,
  `sub1` varchar(12) NOT NULL,
  `sub2` varchar(12) NOT NULL,
  `hits` double NOT NULL,
  `uniques` double NOT NULL,
  `clicks` double NOT NULL,
  `conversions` double NOT NULL,
  `cr` double NOT NULL,
  `epc` double NOT NULL,
  `earnings` double NOT NULL,
  `epm` double NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `domains`
--
ALTER TABLE `domains`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `name_index` (`name`);

--
-- Indexes for table `gen_link`
--
ALTER TABLE `gen_link`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `lead_report`
--
ALTER TABLE `lead_report`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `link_report`
--
ALTER TABLE `link_report`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `domains`
--
ALTER TABLE `domains`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `gen_link`
--
ALTER TABLE `gen_link`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `lead_report`
--
ALTER TABLE `lead_report`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `link_report`
--
ALTER TABLE `link_report`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
