~ethanmad/bouts.app

29bebc9c35a12467b436acd64f326f99972cc6f8 — Ethan Madison 1 year, 8 months ago 7b4b9cc
models/seeding: Add support for IDs

To support exporting to FencingTime, we need to provide some unique
identifier for participants.

Signed-off-by: Ethan Madison <ethan@ethanmad.com>
1 files changed, 4 insertions(+), 1 deletions(-)

M models/seeding.go
M models/seeding.go => models/seeding.go +4 -1
@@ 15,6 15,7 @@ type Seeding struct {
	Category    Category
	Names       []string
	SchoolNames []string
	IDs         []uint
	Elos        []int
}



@@ 67,7 68,7 @@ func (ss *seedingService) Create(category Category, plurality Plurality) (*Seedi
		if err != nil {
			return nil, err
		}
		// Wrap all bouts so they can be used through the game interface
		// Wrap all bouts so they can be used through the game interface.
		var boutWrappers []interface{ game }
		for _, b := range bouts {
			boutWrappers = append(boutWrappers, b)


@@ 90,6 91,7 @@ func (ss *seedingService) Create(category Category, plurality Plurality) (*Seedi
			Names:       names,
			SchoolNames: schoolNames,
			Elos:        sortedElos,
			IDs:         ids,
		}
		return &seeding, nil
	case Squads:


@@ 140,6 142,7 @@ func (ss *seedingService) Create(category Category, plurality Plurality) (*Seedi
			Names:       names,
			SchoolNames: schoolNames,
			Elos:        sortedElos,
			IDs:         ids,
		}
		return &seeding, nil
	default: