Skip to content
Snippets Groups Projects
Commit 5e82855a authored by Alexis Poyen's avatar Alexis Poyen
Browse files

Feat : link a round with candidateLists and area reference

parent 93941b77
No related branches found
No related tags found
1 merge request!1Resolve "Data model"
......@@ -109,16 +109,17 @@ type parameter struct {
}
type round struct {
ID uint `gorm:"primary_key"`
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
DeletedAt *time.Time `json:"-"`
ElectionID uint
parameter parameter
name string
date time.Time
tour uint
deskRounds []deskRound
ID uint `gorm:"primary_key"`
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
DeletedAt *time.Time `json:"-"`
ElectionID uint
parameter parameter
name string
date time.Time
tour uint
deskRounds []deskRound
candidateLists []candidateList
}
type deskRound struct {
......@@ -130,17 +131,19 @@ type deskRound struct {
completed bool
dateCompletion time.Time
validated bool
Votes []Vote
votes []Vote
}
type candidateList struct {
ID uint `gorm:"primary_key"`
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
DeletedAt *time.Time `json:"-"`
PartyID uint
partyID uint
roundID uint
area area `gorm:"foreignkey:AreaRefer"`
name string
candidates []candidate
Votes []Vote
votes []Vote
}
type candidate struct {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment