diff --git a/lib/TestResult.js b/lib/TestResult.js index bada376..a801789 100644 --- a/lib/TestResult.js +++ b/lib/TestResult.js @@ -113,6 +113,17 @@ class TestResult { return 'C'; } + delete() { + const sql = ` + delete from + testResult + where + testResultId = ?; + `; + + this.#conn.runQuery(sql, [ this.id ]); + } + static async create(conn, testId, accountId, studentId, mark) { const sql = ` insert into testResult