auto.bus_api/SharedModels/DataTransferObjects/TicketDto.cs
cuqmbr 20def5de44 feat: add "Popular routes" statistics
feat: add financial report generation

feat: add automation task: indirect route search
2022-12-09 11:54:14 +02:00

67 lines
1.4 KiB
C#

using System.ComponentModel.DataAnnotations;
namespace SharedModels.DataTransferObjects;
public class TicketDto : CreateTicketDto
{
public int Id { get; set; }
[DataType(DataType.DateTime)]
public DateTime PurchaseDateTimeUtc { get; set; }
public bool IsReturned { get; set; } = false;
public bool IsMissed { get; set; } = false;
}
public class CreateTicketDto
{
[Required]
public int TicketGroupId { get; set; }
[Required]
public int VehicleEnrollmentId { get; set; }
[Required]
public int FirstRouteAddressId { get; set; }
[Required]
public int LastRouteAddressId { get; set; }
}
public class UpdateTicketDto
{
[Required]
public int Id { get; set; }
[Required]
public int TicketGroupId { get; set; }
[Required]
public int VehicleEnrollmentId { get; set; }
[Required]
[DataType(DataType.DateTime)]
public DateTime PurchaseDateTimeUtc { get; set; }
[Required]
public bool IsReturned { get; set; } = false;
[Required]
public bool IsMissed { get; set; } = false;
}
public class CreateInTicketGroupTicketDto
{
[Required]
public int VehicleEnrollmentId { get; set; }
[Required]
public int FirstRouteAddressId { get; set; }
[Required]
public int LastRouteAddressId { get; set; }
}
public class InTicketGroupTicketDto : CreateInTicketGroupTicketDto
{
public int Id { get; set; }
}