#7: (WIP) LockedTreatmentView.fxml angefangen & TreatmentDao angepasst.
Some checks failed
Quality Check / Linting Check (push) Failing after 13s
Quality Check / Javadoc Check (push) Successful in 22s

This commit is contained in:
arminribic 2024-05-17 08:04:04 +02:00
parent 6fff093b0a
commit 89e4be5172
3 changed files with 5 additions and 3 deletions

Binary file not shown.

View file

@ -122,7 +122,8 @@ public class TreatmentDao extends DaoImp<Treatment> {
begin = ?, begin = ?,
end = ?, end = ?,
description = ?, description = ?,
remark = ? remark = ?,
isLocked = ?
WHERE id = ? WHERE id = ?
"""; """;
PreparedStatement statement = this.connection.prepareStatement(SQL); PreparedStatement statement = this.connection.prepareStatement(SQL);
@ -131,7 +132,8 @@ public class TreatmentDao extends DaoImp<Treatment> {
statement.setString(3, treatment.getEnd()); statement.setString(3, treatment.getEnd());
statement.setString(4, treatment.getDescription()); statement.setString(4, treatment.getDescription());
statement.setString(5, treatment.getRemarks()); statement.setString(5, treatment.getRemarks());
statement.setInt(6, treatment.getId()); statement.setBoolean(6,treatment.isLocked());
statement.setInt(7, treatment.getId());
return statement; return statement;
} }

View file

@ -8,7 +8,7 @@ CREATE TABLE treatment
end TEXT NOT NULL, end TEXT NOT NULL,
description TEXT NOT NULL, description TEXT NOT NULL,
remark TEXT NOT NULL, remark TEXT NOT NULL,
isLocked BOOLEAN NOT NULL DEFAULT FALSE, isLocked BOOLEAN NOT NULL DEFAULT false,
FOREIGN KEY (patientId) REFERENCES patient (id) ON DELETE CASCADE, FOREIGN KEY (patientId) REFERENCES patient (id) ON DELETE CASCADE,
FOREIGN KEY (nurseId) REFERENCES nurse (id) ON DELETE SET NULL FOREIGN KEY (nurseId) REFERENCES nurse (id) ON DELETE SET NULL
) )