auto.bus_api/SharedModels/DataTransferObjects/RouteAddressDto.cs
cuqmbr 95028ed18b feat: many thing
- Database model
- Data transfer objects
- Country management controller
2022-10-10 20:34:09 +03:00

36 lines
798 B
C#

using System.ComponentModel.DataAnnotations;
namespace SharedModels.DataTransferObjects;
public class RouteAddressDto : CreateRouteAddressDto
{
public int Id { get; set; }
public RouteDto Route { get; set; } = null!;
public AddressDto Address { get; set; } = null!;
}
public class CreateRouteAddressDto
{
[Required]
public int RouteId { get; set; }
[Required]
public int AddressId { get; set; }
[Required]
public int Order { get; set; }
[Required]
[DataType(DataType.Duration)]
public TimeSpan TimeSpanToNextCity { get; set; }
[Required]
[DataType(DataType.Duration)]
public TimeSpan WaitTimeSpan { get; set; }
[Required]
[DataType(DataType.Currency)]
public double CostToNextCity { get; set; }
}