32 lines
802 B
C#
32 lines
802 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace LogisticsApp.Server.Models
|
|
{
|
|
public class WaybillEntry
|
|
{
|
|
[Key]
|
|
public int Id { get; set; }
|
|
|
|
[Required]
|
|
[ForeignKey("Vehicle")]
|
|
public int VehicleId { get; set; }
|
|
|
|
[Required]
|
|
[ForeignKey("Order")]
|
|
public int OrderId { get; set; }
|
|
|
|
[Required]
|
|
[StringLength(5)]
|
|
public string StartTime { get; set; } = string.Empty; // Format: "HH:mm"
|
|
|
|
[Required]
|
|
[StringLength(5)]
|
|
public string EndTime { get; set; } = string.Empty; // Format: "HH:mm"
|
|
|
|
[Required]
|
|
public DateOnly Date { get; set; }
|
|
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
}
|
|
} |