CREATE TABLE
IF NOT EXISTS `users`
(
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `password` varchar
(255) NOT NULL,
  `lastname` varchar
(255) NOT NULL,
  `firstname` varchar
(255) NOT NULL,
  `gender` enum
('Male','Female') CHARACTER
SET utf8mb3
COLLATE utf8mb3_general_ci DEFAULT NULL,
  `cellphone` varchar
(25) NOT NULL,
  `email` varchar
(255) NOT NULL,
  `address_street` varchar
(255) NOT NULL,
  `apt` varchar
(25) DEFAULT NULL,
  `city` varchar
(255) NOT NULL,
  `state` varchar
(25) NOT NULL,
  `zip` varchar
(25) NOT NULL,
  `accept_school_policy` tinyint
(1) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `token` varchar
(255) DEFAULT NULL,
  `is_verified` tinyint
(1) NOT NULL DEFAULT '0',
  `account_id` varchar
(255) DEFAULT NULL,
  `status` varchar
(10) NOT NULL DEFAULT 'Inactive',
  `user_type` enum
('primary','secondary','tertiary') CHARACTER
SET utf8mb3
COLLATE utf8mb3_general_ci DEFAULT 'primary',
  `semester` varchar
(255) NOT NULL,
  `school_year` varchar
(9) DEFAULT NULL,
  `rfid_tag` varchar
(100) CHARACTER
SET utf8mb3
COLLATE utf8mb3_general_ci DEFAULT NULL,
  `failed_attempts` INT DEFAULT 0 NOT NULL,
  `last_failed_at` DATETIME DEFAULT NULL,
  `is_suspended` TINYINT
(1) DEFAULT 0 NOT NULL,
  PRIMARY KEY
(`id`)
);
