29 lines
685 B
C#
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();
|
|
}
|
|
}
|