24 lines
557 B
C#
24 lines
557 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace SushiBarDatabaseImplement.Models
|
|
{
|
|
public class Customer
|
|
{
|
|
[Key]
|
|
public int Id { get; set; }
|
|
|
|
[Required]
|
|
public string Fio { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public DateTime BirthdayDate { get; set; }
|
|
|
|
[Required]
|
|
public double SumOfAllOrders { get; set; }
|
|
|
|
[ForeignKey("CustomerId")]
|
|
public virtual List<Cheque> Cheques { get; set; } = new();
|
|
}
|
|
}
|