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 { ...@@ -109,16 +109,17 @@ type parameter struct {
} }
type round struct { type round struct {
ID uint `gorm:"primary_key"` ID uint `gorm:"primary_key"`
CreatedAt time.Time `json:"-"` CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"`
DeletedAt *time.Time `json:"-"` DeletedAt *time.Time `json:"-"`
ElectionID uint ElectionID uint
parameter parameter parameter parameter
name string name string
date time.Time date time.Time
tour uint tour uint
deskRounds []deskRound deskRounds []deskRound
candidateLists []candidateList
} }
type deskRound struct { type deskRound struct {
...@@ -130,17 +131,19 @@ type deskRound struct { ...@@ -130,17 +131,19 @@ type deskRound struct {
completed bool completed bool
dateCompletion time.Time dateCompletion time.Time
validated bool validated bool
Votes []Vote votes []Vote
} }
type candidateList struct { type candidateList struct {
ID uint `gorm:"primary_key"` ID uint `gorm:"primary_key"`
CreatedAt time.Time `json:"-"` CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"`
DeletedAt *time.Time `json:"-"` DeletedAt *time.Time `json:"-"`
PartyID uint partyID uint
roundID uint
area area `gorm:"foreignkey:AreaRefer"`
name string name string
candidates []candidate candidates []candidate
Votes []Vote votes []Vote
} }
type candidate struct { 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