#8: Setup Schema for User Login
All checks were successful
Quality Check / Linting Check (push) Successful in 12s
Quality Check / Javadoc Check (push) Successful in 21s

This commit is contained in:
Dominik Säume 2024-05-19 22:42:56 +02:00
parent 5106151b3b
commit 0d23177712
Signed by: SZUT-Dominik
GPG key ID: DACB4B96EB59ABA8
2 changed files with 11 additions and 0 deletions

View file

@ -27,6 +27,7 @@
<option value="file://$PROJECT_DIR$/src/main/resources/de/hitec/nhplus/nurse/database/Nurse.sql" /> <option value="file://$PROJECT_DIR$/src/main/resources/de/hitec/nhplus/nurse/database/Nurse.sql" />
<option value="file://$PROJECT_DIR$/src/main/resources/de/hitec/nhplus/medication/database/Medication.sql" /> <option value="file://$PROJECT_DIR$/src/main/resources/de/hitec/nhplus/medication/database/Medication.sql" />
<option value="file://$PROJECT_DIR$/src/main/resources/de/hitec/nhplus/medication/database/Medication_Ingredient.sql" /> <option value="file://$PROJECT_DIR$/src/main/resources/de/hitec/nhplus/medication/database/Medication_Ingredient.sql" />
<option value="file://$PROJECT_DIR$/src/main/resources/de/hitec/nhplus/login/database/User.sql" />
</array> </array>
</option> </option>
<option name="outLayout" value="File per object by schema.groovy" /> <option name="outLayout" value="File per object by schema.groovy" />

View file

@ -0,0 +1,10 @@
CREATE TABLE user
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT NOT NULL,
passwordSalt BINARY(16) NOT NULL, -- 16 Byte Salt
passwordHash BINARY(64) NOT NULL, -- SHA-512 Size
nurseId INTEGER DEFAULT NULL,
isAdmin BOOLEAN DEFAULT false,
FOREIGN KEY (nurseId) REFERENCES nurse (id) ON DELETE CASCADE
)