File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -348,6 +348,9 @@ func CreatePlayers(tenant *isuports.TenantRow) []*isuports.PlayerRow {
348348 for i := 0 ; i < playersNum ; i ++ {
349349 players = append (players , CreatePlayer (tenant ))
350350 }
351+ if tenant .ID <= 2 { // id 1, 2 は特別に固定のplayerを作る
352+ players = append (players , CreateFixedPlayer (tenant ))
353+ }
351354 sort .SliceStable (players , func (i int , j int ) bool {
352355 return players [i ].CreatedAt < players [j ].CreatedAt
353356 })
@@ -367,6 +370,19 @@ func CreatePlayer(tenant *isuports.TenantRow) *isuports.PlayerRow {
367370 return & player
368371}
369372
373+ func CreateFixedPlayer (tenant * isuports.TenantRow ) * isuports.PlayerRow {
374+ created := tenant .CreatedAt
375+ player := isuports.PlayerRow {
376+ TenantID : tenant .ID ,
377+ ID : "000" + fmt .Sprintf ("%x" , tenant .ID ),
378+ DisplayName : fake .Person ().Name (),
379+ IsDisqualified : false ,
380+ CreatedAt : created ,
381+ UpdatedAt : created ,
382+ }
383+ return & player
384+ }
385+
370386func CreateCompetitions (tenant * isuports.TenantRow ) []* isuports.CompetitionRow {
371387 var num int
372388 if tenant .ID == 1 {
You can’t perform that action at this time.
0 commit comments