marco.pms.api/Marco.Pms.Model/Entitlements/EmployeeRoleMapping.cs

32 lines
858 B
C#

using Marco.Pms.Model.Employees;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using System.ComponentModel.DataAnnotations.Schema;
namespace Marco.Pms.Model.Entitlements
{
public class EmployeeRoleMapping
{
public Guid Id { get; set; }
public int EmployeeId { get; set; }
[ValidateNever]
[ForeignKey(nameof(EmployeeId))]
public Employee Employee { get; set; } // Navigation property to Employee
public Guid RoleId { get; set; }
[ValidateNever]
[ForeignKey(nameof(RoleId))]
public ApplicationRole Role { get; set; }
public bool IsEnabled { get; set; }
public int TenantId { get; set; }
[ValidateNever]
[ForeignKey(nameof(TenantId))]
public Tenant Tenant { get; set; }
}
}