Files
evening_detective_server/internal/services/map_service/mapper.go
T
2026-10-01 16:16:43 +07:00

35 lines
596 B
Go

package map_service
import "evening_detective_server/internal/repos/game_map_repo"
type MapItem struct {
GameID int
Kind string
ItemID int
X int
Y int
Hidden bool
}
func mapItem(item game_map_repo.Item) *MapItem {
return &MapItem{
GameID: item.GameID,
Kind: item.Kind,
ItemID: item.ItemID,
X: item.X,
Y: item.Y,
Hidden: item.Hidden,
}
}
func toRepoItem(item *MapItem) game_map_repo.Item {
return game_map_repo.Item{
GameID: item.GameID,
Kind: item.Kind,
ItemID: item.ItemID,
X: item.X,
Y: item.Y,
Hidden: item.Hidden,
}
}