generated from VLADIMIR/template
28 lines
501 B
Go
28 lines
501 B
Go
package services
|
|
|
|
import (
|
|
"evening_detective/internal/models"
|
|
"evening_detective/proto"
|
|
)
|
|
|
|
func mapTeamsToTeamAdvanced(team *models.Team) *proto.TeamAdvanced {
|
|
return &proto.TeamAdvanced{
|
|
Id: team.ID,
|
|
Name: team.Name,
|
|
}
|
|
}
|
|
|
|
func mapTeamsToTeamFull(team *models.Team) *proto.TeamFull {
|
|
return &proto.TeamFull{
|
|
Id: team.ID,
|
|
Name: team.Name,
|
|
Password: team.Password,
|
|
}
|
|
}
|
|
|
|
func mapProtoTeamsToTeam(team *proto.Team) *models.Team {
|
|
return &models.Team{
|
|
Name: team.Name,
|
|
}
|
|
}
|