rts-sim-testing-service/dto/trainManage.go

50 lines
1.5 KiB
Go
Raw Normal View History

package dto
import "joylink.club/bj-rtsts-server/db/model"
type PageTrainManageReqDto struct {
PageQueryDto
Name string `json:"name" form:"name"`
}
type TrainManageReqDto struct {
Name string `json:"name" form:"name"`
}
type TrainModelDto struct {
Id int32 `json:"id" form:"id"`
Name string `json:"name" form:"name"`
}
type TrainSizeDto struct {
Id int32 `json:"id" form:"id"`
Name string `json:"name" form:"name"`
CarriageLength int32 `json:"carriageLength" form:"carriageLength"`
TotalLength int32 `json:"totalLength" form:"totalLength"`
Description string `json:"description" form:"description"`
}
func ConvertFromTrainSizeDto(giSlice []*model.TrainSize) []*TrainSizeDto {
var result []*TrainSizeDto
for _, gi := range giSlice {
result = append(result, &TrainSizeDto{
Id: gi.ID,
Name: gi.Name,
CarriageLength: gi.CarriageLength,
TotalLength: gi.CarriageLength,
Description: gi.Description,
})
}
return result
}
type TrainWheelDiameterDto struct {
Id int32 `json:"id" form:"id"`
Name string `json:"name" form:"name"`
Diameter int32 `json:"diameter" form:"diameter"`
MinDiameter int32 `json:"minDiameter" form:"minDiameter"`
MaxDiameter int32 `json:"maxDiameter" form:"maxDiameter"`
AxialPosition int32 `json:"AxialPosition" form:"AxialPosition"`
InstallDirection string `json:"installDirection" form:"installDirection"`
}