Files
moadiran/Back/Data/Models/OrderItem.cs
mmrbnjd 630d535962 order
2024-07-25 17:18:03 +03:30

27 lines
883 B
C#

using System.ComponentModel.DataAnnotations.Schema;
namespace Back.Data.Models
{
public class OrderItem
{
public int ID { get; set; }
public int OrderID { get; set; }
public int? PermissionID { get; set; }
public int? PromotionID { get; set; }
public int CreditAmount { get; set; }
public decimal APrice { get; set; }
public decimal Discount { get; set; }
public decimal Tax { get; set; }
public decimal Total { get { return (CreditAmount * APrice) - Discount + Tax; } }
#region Navigation
[ForeignKey("OrderID")]
public virtual Order Order { get; set; }
[ForeignKey("PermissionID")]
public virtual Permission? Permission { get; set; }
[ForeignKey("PromotionID")]
public virtual Promotion? Promotion { get; set; }
#endregion
}
}