auto.bus_api/SharedModels/DataTransferObjects/RouteDto.cs
2022-11-23 19:45:15 +02:00

27 lines
542 B
C#

using System.ComponentModel.DataAnnotations;
namespace SharedModels.DataTransferObjects;
public class RouteDto : CreateRouteDto
{
public int Id { get; set; }
}
public class CreateRouteDto
{
[Required]
public string Type { get; set; } = null!;
}
public class UpdateRouteDto : CreateRouteDto
{
[Required]
public int Id { get; set; }
}
public class CreateRouteWithAddressesDto : CreateRouteDto
{
[Required]
[MinLength(2)]
public IList<CreateRouteAddressWithAddressDto> RouteAddresses { get; set; } = null!;
}