--
-- Database: `app-idea`
--

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` varchar(32) NOT NULL,
  `hashtag` varchar(6) NOT NULL,
  `name` varchar(30) NOT NULL,
  `email` varchar(255) NOT NULL,
  `password` char(60) NOT NULL,
  `rank` tinyint(4) DEFAULT 0,
  `avatar_url` varchar(255) DEFAULT NULL,
  `location` varchar(20) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `language` tinyint(4) DEFAULT 0,
  `cash` int(11) DEFAULT 0,
  `posts` int(11) DEFAULT 0,
  `followers` int(11) DEFAULT 0,
  `following` int(11) DEFAULT 0,
  `last_login` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Table structure for table `pictures`
--

CREATE TABLE `pictures` (
  `user_id` varchar(36) NOT NULL,
  `picture_id` int(11) NOT NULL,
  `likes` int(11) DEFAULT 0,
  `dislikes` int(11) DEFAULT 0,
  `location` varchar(20) NOT NULL,
  `description` varchar(250) DEFAULT NULL,
  `created` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `user_id` varchar(32) NOT NULL,
  `session_id` varchar(32) NOT NULL,
  `ip` varchar(32) NOT NULL,
  `user_agent` varchar(32) NOT NULL,
  `last_login` datetime NOT NULL,
  `expires` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Table structure for table `server_settings`
--

CREATE TABLE `server_settings` (
  `name` varchar(50) NOT NULL,
  `value` varchar(50) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;