auto.bus_api/Server/Models/Ticket.cs
2022-11-23 19:45:15 +02:00

22 lines
654 B
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Server.Models;
public class Ticket
{
[Key]
public int Id { get; set; }
[ForeignKey("UserId")]
public string UserId { get; set; } = null!;
public User User { get; set; } = null!;
[ForeignKey("VehicleEnrollmentId")]
public int VehicleEnrollmentId { get; set; }
public VehicleEnrollment VehicleEnrollment { get; set; } = null!;
public DateTime PurchaseDateTimeUtc { get; set; } = DateTime.UtcNow;
public bool IsReturned { get; set; } = false;
public bool IsMissed { get; set; } = false;
}