text: --
  -- Estrutura da tabela `finder`
  --
  
  CREATE TABLE `finder` (
    `id` bigint(20) NOT NULL,
    `name` varchar(45) DEFAULT NULL,
    `phone` varchar(45) DEFAULT NULL,
    `email` varchar(45) DEFAULT NULL,
    `partner_id` bigint(20) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Estrutura da tabela `groups`
  --
  
  CREATE TABLE `groups` (
    `id` int(11) NOT NULL,
    `name` varchar(45) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Estrutura da tabela `item`
  --
  
  CREATE TABLE `item` (
    `id` int(11) NOT NULL,
    `amount` int(11) DEFAULT NULL,
    `price` decimal(10,2) DEFAULT NULL,
    `opportunity_id` bigint(20) NOT NULL,
    `product_id` bigint(20) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  
  --
  -- Estrutura da tabela `opportunity`
  --
  
  CREATE TABLE `opportunity` (
    `id` bigint(20) NOT NULL,
    `company` varchar(255) DEFAULT NULL,
    `person_name` varchar(45) DEFAULT NULL,
    `person_email` varchar(45) DEFAULT NULL,
    `person_tel` varchar(45) DEFAULT NULL,
    `open_date` datetime DEFAULT NULL,
    `next_contact_date` datetime DEFAULT NULL,
    `note` text,
    `user_id` bigint(20) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Estrutura da tabela `partner`
  --
  
  CREATE TABLE `partner` (
    `id` bigint(20) NOT NULL,
    `social_name` varchar(255) DEFAULT NULL,
    `fancy_name` varchar(255) DEFAULT NULL,
    `cnpj` varchar(45) DEFAULT NULL,
    `phone` varchar(45) DEFAULT NULL,
    `create_date` datetime DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Estrutura da tabela `poc`
  --
  
  CREATE TABLE `poc` (
    `id` bigint(20) NOT NULL,
    `previous_duration` int(11) DEFAULT NULL,
    `real_duration` int(11) DEFAULT NULL,
    `person_name` varchar(45) DEFAULT NULL,
    `fk_oportunity` bigint(20) NOT NULL,
    `final_status` varchar(45) NOT NULL,
    `product_id` bigint(20) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Estrutura da tabela `product`
  --
  
  CREATE TABLE `product` (
    `id` bigint(20) NOT NULL,
    `description` varchar(255) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Estrutura da tabela `user`
  --
  
  CREATE TABLE `user` (
    `id` int(11) NOT NULL,
    `username` varchar(255) NOT NULL,
    `auth_key` varchar(32) NOT NULL,
    `password_hash` varchar(255) NOT NULL,
    `confirmation_token` varchar(255) DEFAULT NULL,
    `status` int(11) NOT NULL DEFAULT '1',
    `superadmin` smallint(6) DEFAULT '0',
    `created_at` int(11) NOT NULL,
    `updated_at` int(11) NOT NULL,
    `registration_ip` varchar(15) DEFAULT NULL,
    `bind_to_ip` varchar(255) DEFAULT NULL,
    `email` varchar(128) DEFAULT NULL,
    `email_confirmed` smallint(1) NOT NULL DEFAULT '0'
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  
  --
  -- Estrutura da tabela `user_visit_log`
  --
  
  CREATE TABLE `user_visit_log` (
    `id` int(11) NOT NULL,
    `token` varchar(255) NOT NULL,
    `ip` varchar(15) NOT NULL,
    `language` char(2) NOT NULL,
    `user_agent` varchar(255) NOT NULL,
    `user_id` int(11) DEFAULT NULL,
    `visit_time` int(11) NOT NULL,
    `browser` varchar(30) DEFAULT NULL,
    `os` varchar(20) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;