generated from VLADIMIR/template
add db
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user