2023-08-25 10:41:13 +08:00
|
|
|
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"`
|
2023-08-25 15:14:37 +08:00
|
|
|
CarriageLength int32 `json:"carriage_length" form:"carriage_length"`
|
|
|
|
TotalLength int32 `json:"total_length" form:"total_length"`
|
2023-08-25 10:41:13 +08:00
|
|
|
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,
|
2023-08-28 13:39:28 +08:00
|
|
|
TotalLength: gi.TotalLength,
|
2023-08-25 10:41:13 +08:00
|
|
|
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"`
|
2023-08-25 15:14:37 +08:00
|
|
|
MinDiameter int32 `json:"min_diameter" form:"min_diameter"`
|
|
|
|
MaxDiameter int32 `json:"max_diameter" form:"max_diameter"`
|
|
|
|
AxialPosition int32 `json:"axial_position" form:"axial_position"`
|
|
|
|
InstallDirection string `json:"install_direction" form:"install_direction"`
|
2023-08-25 10:41:13 +08:00
|
|
|
}
|