25 lines
654 B
C#
25 lines
654 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using AutoMapper;
|
|
using RomashkiContracts.DataModels;
|
|
|
|
namespace RomashkiDatabase.Models;
|
|
[AutoMap(typeof(BuyerDataModel), ReverseMap = true)]
|
|
class Buyer
|
|
{
|
|
public required string Id { get; set; } = Guid.NewGuid().ToString();
|
|
public string? FIO { get; set; }
|
|
public required string Email { get; set; }
|
|
public float TotalSpend { get; set; }
|
|
public double DiscountSize { get; set; }
|
|
|
|
[ForeignKey("BuyerId")]
|
|
public List<Sale>? Sales { get; set; }
|
|
|
|
|
|
}
|