From 4d4f424ff0faa920a371258d760626a6cc58da0e Mon Sep 17 00:00:00 2001 From: mmrbnjd Date: Thu, 25 Jul 2024 13:30:56 +0330 Subject: [PATCH] Promotion --- Back/Data/Models/Promotion.cs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Back/Data/Models/Promotion.cs diff --git a/Back/Data/Models/Promotion.cs b/Back/Data/Models/Promotion.cs new file mode 100644 index 0000000..6f37ffc --- /dev/null +++ b/Back/Data/Models/Promotion.cs @@ -0,0 +1,29 @@ +using System.ComponentModel.DataAnnotations.Schema; + +namespace Back.Data.Models +{ + public class Promotion + { + public int ID { get; set; } + public string Name { get; set; } + public bool Satus { get; set; } + + + public IEnumerable PromotionDetails { get; set; } + } + public class PromotionDetails + { + public int ID { get; set; } + public int PromotionID { get; set; } + public int PermissionID { get; set; } + public int CreditAmount { get; set; } + public decimal APrice { get; set; } + public decimal TPrice { get { return APrice * CreditAmount; } } + + [ForeignKey("PermissionID")] + public Permission Permission { get; set; } + [ForeignKey("PromotionID")] + public Promotion Promotion { get; set; } + } + +}