Created PendingOOOStatusWorker
This commit is contained in:
@ -0,0 +1,15 @@
|
||||
drop table if exists Approval;
|
||||
|
||||
create table Approval (
|
||||
ApprovalID integer primary key,
|
||||
IssueID integer not null,
|
||||
UserID integer not null,
|
||||
ItemStatus integer default 0,
|
||||
Delegated integer default 0
|
||||
);
|
||||
|
||||
insert into Approval (IssueID, UserID)
|
||||
values (1, 15),
|
||||
(2, 34),
|
||||
(3, 2),
|
||||
(4, 19);
|
@ -0,0 +1,9 @@
|
||||
drop table if exists OOODelegatedRoles;
|
||||
|
||||
create table OOODelegatedRoles (
|
||||
OOOID integer primary key,
|
||||
UserID integer not null,
|
||||
DelegatedSubRoleID integer not null,
|
||||
InsertTimeStamp text not null,
|
||||
Active integer default 0
|
||||
);
|
16
FabApprovalWorkerService/SetupScripts/CreateOOOTempTable.sql
Normal file
16
FabApprovalWorkerService/SetupScripts/CreateOOOTempTable.sql
Normal file
@ -0,0 +1,16 @@
|
||||
drop table if exists OOOTemp;
|
||||
|
||||
create table OOOTemp (
|
||||
ID INTEGER primary key,
|
||||
OOOUserID INTEGER not null,
|
||||
DelegatedTo INTEGER not null,
|
||||
OOOStartDate TEXT not null,
|
||||
OOOExpirationDate TEXT not null,
|
||||
Processed INTEGER default 0
|
||||
);
|
||||
|
||||
insert into OOOTemp (OOOUserID, DelegatedTo, OOOStartDate, OOOExpirationDate)
|
||||
values (15, 22, '2024-03-19 00:00:00', '2024-04-19 00:00:00'),
|
||||
(34, 19, '2024-03-19 00:00:00', '2024-04-19 00:00:00'),
|
||||
(2, 15, '2024-03-19 00:00:00', '2024-04-01 00:00:00'),
|
||||
(19, 18, '2024-04-01 00:00:00', '2033-06-01 00:00:00');
|
@ -0,0 +1,14 @@
|
||||
drop table if exists UserSubRole;
|
||||
|
||||
create table UserSubRole (
|
||||
UserSubRoleID integer primary key,
|
||||
UserID integer not null,
|
||||
SubRoleID integer not null,
|
||||
Delegated integer default 0
|
||||
);
|
||||
|
||||
insert into UserSubRole (UserID, SubRoleID)
|
||||
values (15, 1),
|
||||
(34, 19),
|
||||
(2, 5),
|
||||
(19, 3);
|
73
FabApprovalWorkerService/SetupScripts/CreateUserTable.sql
Normal file
73
FabApprovalWorkerService/SetupScripts/CreateUserTable.sql
Normal file
@ -0,0 +1,73 @@
|
||||
drop table if exists Users;
|
||||
|
||||
create table Users (
|
||||
UserID INTEGER primary key,
|
||||
LoginID TEXT not null,
|
||||
FirstName TEXT not null,
|
||||
LastName TEXT not null,
|
||||
Email TEXT not null,
|
||||
Notify INTEGER default 0,
|
||||
IsAdmin INTEGER default 0,
|
||||
OOO INTEGER default 0,
|
||||
OOOStartDate TEXT,
|
||||
OOOExpirationDate TEXT,
|
||||
DelegatedTo INTEGER,
|
||||
CanViewITAR INTEGER default 1,
|
||||
IsManager INTEGER default 0,
|
||||
IsCleansCertified INTEGER default 0,
|
||||
IsAnyLevelCertified INTEGER default 0,
|
||||
IsPackagingLabelingCertified INTEGER default 0,
|
||||
IsEpiProCertified INTEGER default 0,
|
||||
IsFqaCertified INTEGER default 0,
|
||||
IsFqaAssessmentCertified INTEGER default 0,
|
||||
IsActive INTEGER default 1
|
||||
);
|
||||
|
||||
insert into Users (LoginID, FirstName, LastName, Email)
|
||||
values ('AsRa', 'Ra', 'As', 'email'),
|
||||
('AuTr', 'Tr', 'Au', 'email'),
|
||||
('AyNi', 'Ni', 'Ay', 'email'),
|
||||
('BaGr', 'Gr', 'Ba', 'email'),
|
||||
('BaGu', 'Gu', 'Ba', 'email'),
|
||||
('BeTo', 'To', 'Be', 'email'),
|
||||
('BeBr', 'Br', 'Be', 'email'),
|
||||
('BrKy', 'Ky', 'Br', 'email'),
|
||||
('CaSh', 'Sh', 'Ca', 'email'),
|
||||
('CaRe', 'Re', 'Ca', 'email'),
|
||||
('CaSt', 'St', 'Ca', 'email'),
|
||||
('ClNi', 'Ni', 'Cl', 'email'),
|
||||
('DaMi', 'Mi', 'Da', 'email'),
|
||||
('FuJe', 'Je', 'Fu', 'email'),
|
||||
('GaAl', 'Al', 'Ga', 'email'),
|
||||
('GoAs', 'As', 'Go', 'email'),
|
||||
('GoRu', 'Ru', 'Go', 'email'),
|
||||
('GoOr', 'Or', 'Go', 'email'),
|
||||
('HaAn', 'An', 'Ha', 'email'),
|
||||
('HaPa', 'Pa', 'Ha', 'email'),
|
||||
('HoJu', 'Ju', 'Ho', 'email'),
|
||||
('HoDe', 'De', 'Ho', 'email'),
|
||||
('HoVi', 'Vi', 'Ho', 'email'),
|
||||
('InCa', 'Ca', 'In', 'email'),
|
||||
('JaMi', 'Mi', 'Ja', 'email'),
|
||||
('LeTh', 'Th', 'Le', 'email'),
|
||||
('LeHa', 'Ha', 'Le', 'email'),
|
||||
('LoAn', 'An', 'Lo', 'email'),
|
||||
('LoCh', 'Ch', 'Lo', 'email'),
|
||||
('LuDa', 'Da', 'Lu', 'email'),
|
||||
('MaBr', 'Br', 'Ma', 'email'),
|
||||
('MaDa', 'Da', 'Ma', 'email'),
|
||||
('MaDo', 'Do', 'Ma', 'email'),
|
||||
('McJu', 'Ju', 'Mc', 'email'),
|
||||
('MeGi', 'Gi', 'Me', 'email'),
|
||||
('MiSh', 'Sh', 'Mi', 'email'),
|
||||
('MoBa', 'Ba', 'Mo', 'email'),
|
||||
('MuTi', 'Ti', 'Mu', 'email'),
|
||||
('OtMa', 'Ma', 'Ot', 'email'),
|
||||
('PeAl', 'Al', 'Pe', 'email'),
|
||||
('RiCy', 'Cy', 'Ri', 'email'),
|
||||
('RoAp', 'Ap', 'Ro', 'email'),
|
||||
('SoAb', 'Ab', 'So', 'email'),
|
||||
('VaMi', 'Mi', 'Va', 'email'),
|
||||
('VuTh', 'Th', 'Va', 'email'),
|
||||
('WeWi', 'Wi', 'We', 'email'),
|
||||
('ZaNi', 'Ni', 'Za', 'email');
|
7
FabApprovalWorkerService/SetupScripts/SetupDb.bat
Normal file
7
FabApprovalWorkerService/SetupScripts/SetupDb.bat
Normal file
@ -0,0 +1,7 @@
|
||||
md D:\FabApprovalWorkerService
|
||||
sqlite3 D:\FabApprovalWorkerService\LocalDb.db < .\CreateUserTable.sql
|
||||
sqlite3 D:\FabApprovalWorkerService\LocalDb.db < .\CreateOOOTempTable.sql
|
||||
sqlite3 D:\FabApprovalWorkerService\LocalDb.db < .\CreateUserSubRoleTable.sql
|
||||
sqlite3 D:\FabApprovalWorkerService\LocalDb.db < .\CreateOOODelegatedRolesTable.sql
|
||||
sqlite3 D:\FabApprovalWorkerService\LocalDb.db < .\CreateApprovalTable.sql
|
||||
pause
|
Reference in New Issue
Block a user