Typen dem neuen Datenbanklayout angepasst
This commit is contained in:
		| @@ -1,36 +1,43 @@ | |||||||
| package types | package types | ||||||
|  |  | ||||||
| type Person struct { | type Person struct { | ||||||
|  | 	ID        int | ||||||
| 	FirstName string | 	FirstName string | ||||||
| 	LastName  string | 	LastName  string | ||||||
| } | } | ||||||
|  |  | ||||||
| type Instructor Person | type Instructor Person | ||||||
|  |  | ||||||
|  | type Participant struct { | ||||||
|  | 	Person | ||||||
|  | 	Company string | ||||||
|  | } | ||||||
|  |  | ||||||
|  | type Briefing struct { | ||||||
|  | 	ID           int | ||||||
|  | 	Date         string | ||||||
|  | 	Time         string | ||||||
|  | 	Location     string | ||||||
|  | 	DocumentName string | ||||||
|  | 	AsOf         string | ||||||
|  | 	InstructorID int | ||||||
|  | } | ||||||
|  |  | ||||||
| type Answer struct { | type Answer struct { | ||||||
| 	ID   int | 	ID   int | ||||||
| 	Text string | 	Text string | ||||||
| } | } | ||||||
|  |  | ||||||
| type Question struct { | type Question struct { | ||||||
|  | 	ID      int | ||||||
| 	Text    string | 	Text    string | ||||||
| 	Answers []Answer | 	Answers []Answer | ||||||
| 	Chosen  int |  | ||||||
| 	Correct int | 	Correct int | ||||||
| } | } | ||||||
|  |  | ||||||
| type Participant struct { | type GivenAnswer struct { | ||||||
| 	ID int64 | 	BriefingID    int | ||||||
| 	Person | 	ParticipantID int | ||||||
| 	Company   string | 	QuestionID    int | ||||||
| 	Questions []Question | 	GivenAnswer   int | ||||||
| } |  | ||||||
|  |  | ||||||
| type Briefing struct { |  | ||||||
| 	Instructor |  | ||||||
| 	Date         string |  | ||||||
| 	Time         string |  | ||||||
| 	State        string |  | ||||||
| 	Location     string |  | ||||||
| 	Participants []*Participant |  | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user