2023-11-01 14:11:00 +01:00
|
|
|
/*
|
|
|
|
* Sicherheitsunterweisung
|
|
|
|
* Copyright (C) 2023 Jason Streifling
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2023-10-28 08:49:28 +02:00
|
|
|
package data
|
2023-10-19 19:59:11 +02:00
|
|
|
|
2023-10-28 08:57:15 +02:00
|
|
|
import "database/sql"
|
|
|
|
|
|
|
|
type DB struct {
|
|
|
|
*sql.DB
|
|
|
|
}
|
|
|
|
|
2023-10-05 19:52:11 +02:00
|
|
|
type Person struct {
|
2023-10-18 16:43:04 +02:00
|
|
|
ID int64
|
2023-10-05 19:52:11 +02:00
|
|
|
FirstName string
|
|
|
|
LastName string
|
|
|
|
}
|
|
|
|
|
2023-10-28 08:01:34 +02:00
|
|
|
type Instructor Person
|
2023-10-05 19:52:11 +02:00
|
|
|
|
2023-10-17 17:04:17 +02:00
|
|
|
type Participant struct {
|
|
|
|
Person
|
|
|
|
Company string
|
|
|
|
}
|
|
|
|
|
|
|
|
type Briefing struct {
|
2023-10-18 16:43:04 +02:00
|
|
|
ID int64
|
2023-11-01 13:11:50 +01:00
|
|
|
DateTime string
|
2023-10-17 17:04:17 +02:00
|
|
|
Location string
|
2023-11-01 13:11:50 +01:00
|
|
|
Document string
|
2023-10-17 17:04:17 +02:00
|
|
|
AsOf string
|
2023-10-18 16:43:04 +02:00
|
|
|
InstructorID int64
|
2023-10-17 17:04:17 +02:00
|
|
|
}
|
|
|
|
|
2023-10-16 18:51:52 +02:00
|
|
|
type Answer struct {
|
2023-10-18 16:43:04 +02:00
|
|
|
ID int64
|
2023-10-10 18:50:54 +02:00
|
|
|
Text string
|
|
|
|
}
|
|
|
|
|
|
|
|
type Question struct {
|
2023-10-18 16:43:04 +02:00
|
|
|
ID int64
|
2023-10-16 18:51:52 +02:00
|
|
|
Text string
|
2023-10-10 18:50:54 +02:00
|
|
|
Answers []Answer
|
2023-10-16 18:51:52 +02:00
|
|
|
Correct int
|
2023-10-10 18:50:54 +02:00
|
|
|
}
|
|
|
|
|
2023-10-17 17:04:17 +02:00
|
|
|
type GivenAnswer struct {
|
2023-10-18 16:43:04 +02:00
|
|
|
BriefingID int64
|
|
|
|
ParticipantID int64
|
|
|
|
QuestionID int64
|
2023-10-17 17:04:17 +02:00
|
|
|
GivenAnswer int
|
2023-10-05 19:52:11 +02:00
|
|
|
}
|
2023-10-17 17:30:39 +02:00
|
|
|
|
|
|
|
type OverviewTableData struct {
|
|
|
|
InstructorFirstName string
|
|
|
|
InstructorLastName string
|
2023-11-01 13:11:50 +01:00
|
|
|
BriefingDateTime string
|
2023-10-17 17:30:39 +02:00
|
|
|
BriefingLocation string
|
2023-11-01 13:11:50 +01:00
|
|
|
BriefingDocument string
|
2023-10-17 17:30:39 +02:00
|
|
|
BriefingAsOf string
|
|
|
|
ParticipantFirstName string
|
|
|
|
ParticipantLastName string
|
|
|
|
ParticipantCompany string
|
|
|
|
}
|