-- phpMyAdmin SQL Dump
-- version 4.6.6deb4+deb9u2
-- https://www.phpmyadmin.net/
--
-- Хост: 178.249.69.112:3306
-- Время создания: Июн 16 2021 г., 11:28
-- Версия сервера: 5.7.34-37-log
-- Версия PHP: 5.6.40-50+0~20210501.52+debian9~1.gbpf9383b

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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 */;

--
-- База данных: `u0305746_jw`
--

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

--
-- Структура таблицы `requisitions`
--

CREATE TABLE `requisitions` (
  `id` int(11) NOT NULL,
  `name` varchar(255) CHARACTER SET utf8 NOT NULL,
  `user_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `client_id` int(11) NOT NULL DEFAULT '0',
  `object_id` int(11) NOT NULL DEFAULT '0',
  `funnel_id` int(11) NOT NULL DEFAULT '0',
  `type_id` int(11) NOT NULL DEFAULT '0',
  `step_id` int(11) NOT NULL DEFAULT '0',
  `who_work` int(11) NOT NULL,
  `who_delete` int(11) NOT NULL DEFAULT '0',
  `confirm` int(11) NOT NULL DEFAULT '1',
  `description` text CHARACTER SET utf8 NOT NULL,
  `stage` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(4) NOT NULL DEFAULT '0',
  `cancel` tinyint(4) NOT NULL DEFAULT '0',
  `priority` int(11) NOT NULL DEFAULT '0',
  `doer_clients` tinyint(2) NOT NULL DEFAULT '0',
  `hot` int(11) NOT NULL DEFAULT '0',
  `reason` text CHARACTER SET utf8,
  `denial` int(11) NOT NULL DEFAULT '0',
  `summa` float NOT NULL DEFAULT '0',
  `activities` varchar(500) CHARACTER SET utf8 NOT NULL DEFAULT '',
  `source` int(11) NOT NULL DEFAULT '0',
  `doers` varchar(1000) CHARACTER SET utf8 DEFAULT NULL,
  `doers_confirm` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Индексы сохранённых таблиц
--

--
-- Индексы таблицы `requisitions`
--
ALTER TABLE `requisitions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `funnel_id` (`funnel_id`),
  ADD KEY `who_work` (`who_work`),
  ADD KEY `confirm` (`confirm`),
  ADD KEY `deleted` (`deleted`),
  ADD KEY `cancel` (`cancel`),
  ADD KEY `hot` (`hot`),
  ADD KEY `client_id` (`client_id`),
  ADD KEY `step_id` (`step_id`),
  ADD KEY `type_id` (`type_id`),
  ADD KEY `doers` (`doers`),
  ADD KEY `doers_confirm` (`doers_confirm`),
  ADD KEY `doer_clients` (`doer_clients`),
  ADD KEY `stage` (`stage`);

--
-- AUTO_INCREMENT для сохранённых таблиц
--

--
-- AUTO_INCREMENT для таблицы `requisitions`
--
ALTER TABLE `requisitions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
/*!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 */;
