Files
PIbd-23_Valiullin_R.A_Romashki/Romashki/RomashkiDatabase/Models/Sale.cs
2025-04-14 20:04:36 +04:00

32 lines
918 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RomashkiContracts.DataModels;
using System.Xml;
using RomashkiContracts.Enums;
using RomashkiContracts.Extensions;
using RomashkiContracts.Exceptions;
namespace RomashkiDatabase.Models;
internal class Sale
{
public string Id { get; set; } = Guid.NewGuid().ToString();
public required string WorkerId { get; set; }
public string? BuyerId { get; set; }
public DateTime SaleDate { get; set; }
public double Sum { get; set; }
public DiscountType DiscountType { get; set; }
public double Discount { get; set; }
public bool IsCancel { get; set; }
public Worker? Worker { get; set; }
public Buyer? Buyer { get; set; }
[ForeignKey("SaleId")]
public List<SaleProduct>? SaleProducts { get; set; }
}