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
|
|
|
|
}
|
|
|
|
|
2023-11-13 14:15:56 +08:00
|
|
|
type TrainWheelDto struct {
|
|
|
|
Id int32 `json:"id" form:"id"`
|
|
|
|
Name string `json:"name" form:"name"`
|
|
|
|
MinDiameter int32 `json:"min_diameter" form:"min_diameter"`
|
|
|
|
MaxDiameter int32 `json:"max_diameter" form:"max_diameter"`
|
2023-08-25 10:41:13 +08:00
|
|
|
}
|