43 lines
879 B
C#
43 lines
879 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace SharedModels.DataTransferObjects;
|
|
|
|
public class RouteAddressDto : CreateRouteAddressDto
|
|
{
|
|
public int Id { get; set; }
|
|
}
|
|
|
|
public class CreateRouteAddressDto
|
|
{
|
|
[Required]
|
|
public int RouteId { get; set; }
|
|
|
|
[Required]
|
|
public int AddressId { get; set; }
|
|
|
|
[Required]
|
|
[Range(0, Int32.MaxValue)]
|
|
public int Order { get; set; }
|
|
}
|
|
|
|
public class UpdateRouteAddressDto : CreateRouteAddressDto
|
|
{
|
|
[Required]
|
|
public int Id { get; set; }
|
|
}
|
|
|
|
public class CreateRouteAddressWithAddressDto
|
|
{
|
|
[Range(0, Int32.MaxValue)]
|
|
public int Order { get; set; }
|
|
|
|
[Required]
|
|
public CreateAddressInRouteAddress Address { get; set; } = null!;
|
|
}
|
|
|
|
public class RouteAddressWithAddressDto
|
|
{
|
|
public int Order { get; set; }
|
|
|
|
public AddressInRouteAddress Address { get; set; } = null!;
|
|
} |