2024-07-25 13:30:56 +03:30
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
|
|
|
namespace Back.Data.Models
|
|
|
|
|
{
|
|
|
|
|
public class Promotion
|
|
|
|
|
{
|
|
|
|
|
public int ID { get; set; }
|
|
|
|
|
public string Name { get; set; }
|
2024-07-25 17:18:03 +03:30
|
|
|
|
public bool Status { get; set; }
|
2024-07-25 13:30:56 +03:30
|
|
|
|
|
2024-07-25 17:18:03 +03:30
|
|
|
|
public virtual IEnumerable<PromotionDetails> PromotionDetails { get; set; }
|
2024-07-25 13:30:56 +03:30
|
|
|
|
}
|
|
|
|
|
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")]
|
2024-07-25 17:18:03 +03:30
|
|
|
|
public virtual Permission Permission { get; set; }
|
2024-07-25 13:30:56 +03:30
|
|
|
|
[ForeignKey("PromotionID")]
|
2024-07-25 17:18:03 +03:30
|
|
|
|
public virtual Promotion Promotion { get; set; }
|
2024-07-25 13:30:56 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|