30 lines
833 B
C#
30 lines
833 B
C#
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; }
|
|
}
|
|
|
|
}
|