package team import "hyapp-admin-server/internal/model" func teamDTOs(teams []model.Team) []map[string]any { out := make([]map[string]any, 0, len(teams)) for _, item := range teams { out = append(out, teamDTO(item)) } return out } func teamDTO(item model.Team) map[string]any { return map[string]any{ "id": item.ID, "parentId": item.ParentID, "parentName": item.ParentName, "name": item.Name, "description": item.Description, "sort": item.Sort, "userCount": item.UserCount, "createdAtMs": item.CreatedAtMS, "updatedAtMs": item.UpdatedAtMS, } }