Adding
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
using LCU.Library.Internal.IncentiveApiModels.Common;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using LCU.Library.Internal.IncentiveApiModels.Enums;
|
||||
|
||||
namespace LCU.Library.Internal.IncentiveApiModels.Entities
|
||||
{
|
||||
public class Commission : Auditable
|
||||
{
|
||||
[Required]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[JsonConverter(typeof(RoleConverter))]
|
||||
public Role Role { get; set; }
|
||||
|
||||
[Required]
|
||||
public int RatePerProduct { get; set; }
|
||||
|
||||
[Required]
|
||||
public Product Product { get; set; }
|
||||
|
||||
public bool HasSameRoleAndProduct(Commission commission)
|
||||
{
|
||||
return Role == commission.Role && Product == commission.Product;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user