add games operations

This commit is contained in:
2026-07-26 22:38:33 +07:00
parent cf32a6114f
commit 6fc19833d3
24 changed files with 2430 additions and 96 deletions
+25
View File
@@ -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
}