29 lines
748 B
C#
29 lines
748 B
C#
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;
|
|
}
|
|
}
|
|
}
|