-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 26, 2024 at 06:55 AM
-- Server version: 5.6.41
-- PHP Version: 8.2.4

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

--
-- Database: `rnzca_digi_kyc`
--

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

--
-- Table structure for table `dm_adm_user`
--

CREATE TABLE `dm_adm_user` (
  `id` int(11) NOT NULL,
  `agent` enum('no','yes') NOT NULL,
  `added_by` int(11) DEFAULT NULL,
  `name` varchar(222) NOT NULL,
  `language` int(11) DEFAULT '1',
  `gender` varchar(10) DEFAULT NULL,
  `avatar` varchar(200) DEFAULT NULL,
  `username` varchar(222) NOT NULL,
  `password` varchar(222) NOT NULL,
  `designation` int(11) DEFAULT NULL,
  `department` int(11) DEFAULT NULL,
  `branch` int(11) DEFAULT NULL,
  `branch_admin` int(11) DEFAULT NULL,
  `user_group` varchar(100) DEFAULT NULL,
  `email` varchar(222) NOT NULL,
  `mobile` varchar(222) NOT NULL,
  `admin_type` enum('admin','staff') NOT NULL,
  `blood_group` varchar(10) DEFAULT NULL,
  `company` int(11) DEFAULT NULL,
  `document` varchar(200) DEFAULT NULL,
  `address` varchar(200) DEFAULT NULL,
  `country` int(11) DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  `city` varchar(30) DEFAULT NULL,
  `pincode` int(11) DEFAULT NULL,
  `signature` text,
  `role` text NOT NULL,
  `member_type` int(11) DEFAULT NULL,
  `occupation` int(11) DEFAULT NULL,
  `login` int(11) DEFAULT NULL,
  `expiry_date` datetime DEFAULT NULL,
  `ip` varchar(222) DEFAULT NULL,
  `status` int(11) DEFAULT '0',
  `is_deleted` int(11) DEFAULT '0',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `dm_master_designation`
--

CREATE TABLE `dm_master_designation` (
  `designation_id` int(11) NOT NULL,
  `designation_code` varchar(250) NOT NULL,
  `designation_name` varchar(250) NOT NULL,
  `role` text NOT NULL,
  `remark` varchar(250) DEFAULT NULL,
  `company` int(11) NOT NULL,
  `user` int(11) NOT NULL,
  `ip` varchar(250) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `dm_twofa_authenticator`
--

CREATE TABLE `dm_twofa_authenticator` (
  `tfa_id` int(11) NOT NULL,
  `token` varchar(255) NOT NULL,
  `otp` varchar(255) DEFAULT NULL,
  `ref_no` varchar(255) DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  `is_expired` tinyint(1) NOT NULL DEFAULT '0',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `dm_adm_user`
--
ALTER TABLE `dm_adm_user`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dm_master_designation`
--
ALTER TABLE `dm_master_designation`
  ADD PRIMARY KEY (`designation_id`);

--
-- Indexes for table `dm_twofa_authenticator`
--
ALTER TABLE `dm_twofa_authenticator`
  ADD PRIMARY KEY (`tfa_id`),
  ADD KEY `user_id` (`user_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `dm_adm_user`
--
ALTER TABLE `dm_adm_user`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `dm_master_designation`
--
ALTER TABLE `dm_master_designation`
  MODIFY `designation_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `dm_twofa_authenticator`
--
ALTER TABLE `dm_twofa_authenticator`
  MODIFY `tfa_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `dm_twofa_authenticator`
--
ALTER TABLE `dm_twofa_authenticator`
  ADD CONSTRAINT `dm_twofa_authenticator_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `dm_adm_user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;

/*!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 */;
