package app import ( "evening_detective_server/internal/services/game_model" "evening_detective_server/proto" ) func mapTeam( o *game_model.Team, ) *proto.Team { return &proto.Team{ ID: o.ID, Name: o.Name, Status: o.Status, Password: o.Password, ActionsCount: int32(o.ActionsCount), Applications: mapApplications(o.Applications), } } func mapTeamDetails(o *game_model.Team) *proto.Team { team := mapTeam(o) team.ParticipationStatus = o.ParticipationStatus team.ParticipationSource = o.ParticipationSource team.ParticipationEmailError = o.ParticipationEmailError team.ParticipationEmailSent = o.ParticipationEmailSent team.CaptainEmail = o.CaptainEmail team.ParticipantsCount = o.ParticipantsCount return team }