#8: Setup Schema for User Login
All checks were successful
Quality Check / Linting Check (push) Successful in 13s
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 ed6a19b6af
Signed by: SZUT-Dominik
GPG key ID: DACB4B96EB59ABA8
4 changed files with 24 additions and 1 deletions

View file

@ -27,9 +27,12 @@
<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" />
<option value="file://$PROJECT_DIR$/src/main/resources/de/hitec/nhplus/login/database/UserPermission.sql" />
<option value="file://$PROJECT_DIR$/src/main/resources/de/hitec/nhplus/login/database/UserToNurse.sql" />
</array> </array>
</option> </option>
<option name="outLayout" value="File per object by schema.groovy" /> <option name="outLayout" value="File per object.groovy" />
</State> </State>
</list> </list>
</option> </option>

View file

@ -0,0 +1,7 @@
CREATE TABLE user
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT NOT NULL,
passwordSalt BLOB NOT NULL,
passwordHash BLOB NOT NULL
)

View file

@ -0,0 +1,6 @@
CREATE TABLE user__permissions
(
userId INTEGER NOT NULL,
permissions INTEGER, -- Binary Bitmask for Permissions
FOREIGN KEY (userId) REFERENCES user (id) ON DELETE CASCADE
)

View file

@ -0,0 +1,7 @@
CREATE TABLE user__nurse
(
userId INTEGER NOT NULL,
nurseId INTEGER NOT NULL,
FOREIGN KEY (userId) REFERENCES user (id) ON DELETE CASCADE,
FOREIGN KEY (nurseId) REFERENCES nurse (id) ON DELETE CASCADE
)