Advertisement
Guest User

Untitled

a guest
Dec 10th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.75 KB | None | 0 0
  1. using Atol.Core.Domain.Organizations;
  2. using System;
  3. using System.Collections.Generic;
  4.  
  5. namespace Atol.Core.Domain.Receipts
  6. {
  7.     public class Receipt : BaseEntity
  8.     {
  9.         private ICollection<ReceiptLog> _receiptLogs;
  10.         private ICollection<ReceiptLines> _receiptLines;
  11.  
  12.         public int DeviceId { get; set; }        
  13.         public string CustomerEmail { get; set; }
  14.         public string CustomerPhone { get; set; }
  15.         public string OrderNumber { get; set; }
  16.         public decimal OrderTotal { get; set; }
  17.         public DateTime CreatedOnUtc { get; set; }
  18.         public int OperationTypeId { get; set; }
  19.         public OperationType OperationType
  20.         {
  21.             get { return (OperationType)OperationTypeId; }
  22.             set { this.OperationTypeId = (int)value; }
  23.         }
  24.         public int PaymentTypeId { get; set; }
  25.         public PaymentType PaymentType
  26.         {
  27.             get { return (PaymentType)PaymentTypeId; }
  28.             set { this.PaymentTypeId = (int)value; }
  29.         }
  30.         public decimal PaymentSum { get; set; }
  31.         public int StatusId { get; set; }
  32.         public StatusType Status
  33.         {
  34.             get { return (StatusType)StatusId; }
  35.             set { this.StatusId = (int)value; }
  36.         }
  37.         public int SourceId { get; set; }
  38.         public Source Source
  39.         {
  40.             get { return (Source)SourceId; }
  41.             set { this.SourceId = (int)value; }
  42.         }
  43.         public int OrganizationId { get; set; }
  44.         public virtual Organization Organization { get; set; }
  45.         public virtual ICollection<ReceiptLog> ReceiptLogs
  46.         {
  47.             get => _receiptLogs ?? (_receiptLogs = new List<ReceiptLog>());
  48.             set => _receiptLogs = value;
  49.         }
  50.         public virtual ICollection<ReceiptLines> ReceiptsLines
  51.         {
  52.             get => _receiptLines ?? (_receiptLines = new List<ReceiptLines>());
  53.             set => _receiptLines = value;
  54.         }
  55.  
  56.         public void AddReceiptLog(ReceiptLog receiptLog)
  57.         {
  58.             ReceiptLogs.Add(receiptLog);
  59.         }
  60.         public void DeleteReceiptLog(ReceiptLog receiptLog)
  61.         {
  62.             ReceiptLogs.Remove(receiptLog);
  63.         }
  64.         public void AddReceiptLines(ReceiptLines receiptLines)
  65.         {
  66.             ReceiptsLines.Add(receiptLines);
  67.         }
  68.         public void DeleteReceiptLines(ReceiptLines receiptLines)
  69.         {
  70.             ReceiptsLines.Remove(receiptLines);
  71.         }
  72.     }
  73. }
  74.  
  75.  
  76. using System;
  77.  
  78. namespace Atol.Core.Domain.Receipts
  79. {
  80.     public class ReceiptLines : BaseEntity
  81.     {
  82.         /// <summary>
  83.         /// Gets or sets the Receipt Id
  84.         /// </summary>
  85.         public int ReceiptId { get; set; }
  86.  
  87.         /// <summary>
  88.         /// Gets or sets the Name
  89.         /// </summary>
  90.         public string Name { get; set; }
  91.  
  92.         /// <summary>
  93.         /// Gets or sets the Price
  94.         /// </summary>
  95.         public decimal Price { get; set; }
  96.  
  97.         /// <summary>
  98.         /// Gets or sets the Quantity
  99.         /// </summary>
  100.         public decimal Quantity { get; set; }
  101.  
  102.         /// <summary>
  103.         /// Gets or sets the Sum
  104.         /// </summary>
  105.         public decimal Sum { get; set; }
  106.  
  107.         public int TaxId { get; set; }
  108.         /// <summary>
  109.         /// Gets or sets the Tax
  110.         /// </summary>
  111.         public Tax Tax
  112.         {
  113.             get { return (Tax)TaxId; }
  114.             set { this.TaxId = (int)value; }
  115.         }
  116.  
  117.         /// <summary>
  118.         /// Gets or sets the Tax Sum
  119.         /// </summary>
  120.         public decimal TaxSum { get; set; }
  121.  
  122.         /// <summary>
  123.         /// Gets or sets the Receip
  124.         /// </summary>
  125.         public virtual Receipt Receipt { get; set; }
  126.     }
  127. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement