PIbd-22_Shabunov_O.A._SushiBar/SushiBarDatabaseImplement/Models/Cheque.cs
2024-05-15 21:14:04 +04:00

29 lines
685 B
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace SushiBarDatabaseImplement.Models
{
public class Cheque
{
[Key]
public int Id { get; set; }
public int? CustomerId { get; set; }
public virtual Customer? Customer { get; set; }
[Required]
public DateTime OrderDate { get; set; }
[Required]
public double TotalSum { get; set; }
public int? PromotionId { get; set; }
public virtual Promotion? Promotion { get; set; }
[ForeignKey("ChequeId")]
public virtual List<ChequeItem> ChequeItems { get; set; } = new();
}
}