Promotion
This commit is contained in:
29
Back/Data/Models/Promotion.cs
Normal file
29
Back/Data/Models/Promotion.cs
Normal file
@@ -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> 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; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user