-- noinspection SqlNoDataSourceInspectionForFile

-- Schema: users
-- Brief: Control user access into POS
-- Created by: amerolli
-- Table schema_version: must be defined for database update through the Persistence Component

CREATE TABLE schema_version AS
SELECT "$Author: rrosauro $" AS Author,
       "$Date: 2009-11-27 11:37:18 -0200 (Fri, 27 Nov 2009) $" AS LastModifiedAt,
       "$Revision:$" AS Revision;

CREATE TABLE Users (
    UserId                  INTEGER PRIMARY KEY AUTOINCREMENT,
    UserName                VARCHAR(15) NOT NULL,
    LongName                VARCHAR(50) NOT NULL,
    Password                VARCHAR(32) NOT NULL,
    PasswordValidity        DATETIME,
    Level                   INTEGER NOT NULL DEFAULT 0,
    Status                  INTEGER NOT NULL,
    AdmissionDate           DATE NOT NULL,
    TerminationDate         DATETIME,
    PayRate                 VARCHAR(30),
    BadgeNumber             TEXT,
    FingerPrintMinutiae     BLOB,
    NfcUuid                 VARCHAR(32) UNIQUE
);


--
-- Default user (1/1)
--
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(6626,     'Suporte', 'Suporte', '2a68fba8d921e4bd3e5b03ba401bf6eb', 30, 0, '2019-01-01', '2a68fba8d921e4bd3e5b03ba401bf6eb');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(31415,   'Delivery','Delivery', '7c3d32402e4509c78b5c4ed6552ef756', 21, 0, '2019-01-01', '7c3d32402e4509c78b5c4ed6552ef756');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(2718,       'Totem',   'Totem', 'b1eac4329ffd24ef085940fe70904e00', 21, 0, '2019-01-01', 'b1eac4329ffd24ef085940fe70904e00');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180001, 'Totem01', 'Totem01', '1022a6963c76b9aa97a85b207865cb95', 21, 0, '2019-01-01', '1022a6963c76b9aa97a85b207865cb95');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180002, 'Totem02', 'Totem02', '6475a8ec4860e1b4f386d3f4377c43ff', 21, 0, '2019-01-01', '6475a8ec4860e1b4f386d3f4377c43ff');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180003, 'Totem03', 'Totem03', 'e505b8dd99fba45eb6a2a4c96e9bbc2c', 21, 0, '2019-01-01', 'e505b8dd99fba45eb6a2a4c96e9bbc2c');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180004, 'Totem04', 'Totem04', 'c7e75f616546de4ecb69a3abf0cd0cab', 21, 0, '2019-01-01', 'c7e75f616546de4ecb69a3abf0cd0cab');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180005, 'Totem05', 'Totem05', '80a5dcace2be6c290836e5a5567d8350', 21, 0, '2019-01-01', '80a5dcace2be6c290836e5a5567d8350');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180006, 'Totem06', 'Totem06', '05cbba396983ac8964deec69cc8d2131', 21, 0, '2019-01-01', '05cbba396983ac8964deec69cc8d2131');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180007, 'Totem07', 'Totem07', '889c017e54b2d6285ebad484575e1f63', 21, 0, '2019-01-01', '889c017e54b2d6285ebad484575e1f63');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180008, 'Totem08', 'Totem08', '198968f40e0cfb1d3e9e98dad96a096a', 21, 0, '2019-01-01', '198968f40e0cfb1d3e9e98dad96a096a');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180009, 'Totem09', 'Totem09', '4eb6c2cff967297cd8e2ac60f9470548', 21, 0, '2019-01-01', '4eb6c2cff967297cd8e2ac60f9470548');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180010, 'Totem10', 'Totem10', 'e0ca929d9c6a2c92a4a79043818584cb', 21, 0, '2019-01-01', 'e0ca929d9c6a2c92a4a79043818584cb');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180011, 'Totem11', 'Totem11', '31e579759e50f1425df519d16ca15b24', 21, 0, '2019-01-01', '31e579759e50f1425df519d16ca15b24');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180012, 'Totem12', 'Totem12', 'b23cfaf980885d82a63605cb8212f60b', 21, 0, '2019-01-01', 'b23cfaf980885d82a63605cb8212f60b');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180013, 'Totem13', 'Totem13', 'f54da54aee4b8f1647b95fad79db0bc5', 21, 0, '2019-01-01', 'f54da54aee4b8f1647b95fad79db0bc5');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180014, 'Totem14', 'Totem14', '4567e5cc6b36ed40b06323e846c06d66', 21, 0, '2019-01-01', '4567e5cc6b36ed40b06323e846c06d66');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180015, 'Totem15', 'Totem15', 'd445a24aebf7cae16f9952cfd02bbdf6', 21, 0, '2019-01-01', 'd445a24aebf7cae16f9952cfd02bbdf6');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180016, 'Totem16', 'Totem16', 'b1810a04c0f0c571de0fc65cb54eeef2', 21, 0, '2019-01-01', 'b1810a04c0f0c571de0fc65cb54eeef2');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180017, 'Totem17', 'Totem17', '518195c33e4a757ab9205af8ca230963', 21, 0, '2019-01-01', '518195c33e4a757ab9205af8ca230963');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180018, 'Totem18', 'Totem18', '5605fd3a0b9783b5c2c991761b5720d3', 21, 0, '2019-01-01', '5605fd3a0b9783b5c2c991761b5720d3');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180019, 'Totem19', 'Totem19', '4f5899b71631d09c117515ac79328eda', 21, 0, '2019-01-01', '4f5899b71631d09c117515ac79328eda');
INSERT INTO Users(UserId, UserName, LongName, Password, Level, Status, AdmissionDate, NfcUuid) VALUES(27180020, 'Totem20', 'Totem20', '275e70d6c26154ca2bb010b00743031e', 21, 0, '2019-01-01', '275e70d6c26154ca2bb010b00743031e');
