2024-03-30 15:10:36 +03:30
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
|
|
|
namespace Back.Data.Models
|
|
|
|
|
{
|
|
|
|
|
public class OrderItem
|
|
|
|
|
{
|
|
|
|
|
public int ID { get; set; }
|
|
|
|
|
public int OrderID { get; set; }
|
2024-07-25 17:18:03 +03:30
|
|
|
|
public int? PermissionID { get; set; }
|
|
|
|
|
public int? PromotionID { get; set; }
|
2024-03-30 15:10:36 +03:30
|
|
|
|
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")]
|
2024-07-25 17:18:03 +03:30
|
|
|
|
public virtual Permission? Permission { get; set; }
|
|
|
|
|
[ForeignKey("PromotionID")]
|
|
|
|
|
public virtual Promotion? Promotion { get; set; }
|
2024-03-30 15:10:36 +03:30
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|