| 123456789101112131415161718 |
- package serializer
- import "dsbqj-admin/model/mongo/platform"
- type PlatformResponse struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Code string `json:"code"`
- Status bool `json:"status"`
- }
- func BuildPlatformList(list []platform.Platform) []*PlatformResponse {
- result := make([]*PlatformResponse, 0, len(list))
- for i := range list {
- result = append(result, &PlatformResponse{ID: list[i].ID.Hex(), Name: list[i].Name, Code: list[i].Code, Status: list[i].Status})
- }
- return result
- }
|