#8: Setup Schema for User Login
This commit is contained in:
parent
5106151b3b
commit
ed6a19b6af
4 changed files with 24 additions and 1 deletions
|
@ -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>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
CREATE TABLE user
|
||||||
|
(
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
|
username TEXT NOT NULL,
|
||||||
|
passwordSalt BLOB NOT NULL,
|
||||||
|
passwordHash BLOB NOT NULL
|
||||||
|
)
|
|
@ -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
|
||||||
|
)
|
|
@ -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
|
||||||
|
)
|
Loading…
Reference in a new issue