generated from VLADIMIR/template
add games operations
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"evening_detective_server/internal/services/game_service"
|
||||
"evening_detective_server/proto"
|
||||
)
|
||||
|
||||
func mapTeam(
|
||||
o *game_service.Team,
|
||||
) *proto.Team {
|
||||
return &proto.Team{
|
||||
Id: int32(o.ID),
|
||||
Name: o.Name,
|
||||
}
|
||||
}
|
||||
|
||||
func mapTeams(
|
||||
o []*game_service.Team,
|
||||
) []*proto.Team {
|
||||
res := make([]*proto.Team, 0, len(o))
|
||||
for _, item := range o {
|
||||
res = append(res, mapTeam(item))
|
||||
}
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user