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

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

CREATE TABLE `devices` (
  `id` int(11) NOT NULL,
  `alias` varchar(100) NOT NULL,
  `name` varchar(100) NOT NULL,
  `device_type` varchar(50) NOT NULL,
  `device_name` varchar(100) NOT NULL,
  `device_ip` varchar(50) NOT NULL,
  `device_mac` varchar(100) NOT NULL,
  `device_id` varchar(100) NOT NULL,
  `firmware_version` varchar(10) NOT NULL,
  `connection_state` varchar(50) NOT NULL COMMENT 'active | lost',
  `description` text NOT NULL,
  `lact_contact` timestamp NOT NULL,
  `update_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `create_at` timestamp NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
