using Marco.Pms.Model.Dtos.Employees;
using Marco.Pms.Model.Employees;

namespace Marco.Pms.Model.Mapper
{
    public static class EmployeeRoleMapper
    {
        //public static EmployeeRolesVM ToRoleVMFromEmployeeRole(this EmployeeRole model)
        //{
        //    return new EmployeeRolesVM
        //    {
        //        Id = model.Id,
        //        Role = model.Role,
        //        Description = model.Description,
        //        Features = model.Features
        //    };
        //}
        public static EmployeeRoleMapping ToEmployeeRoleMappingFromEmployeeRoleDot(this EmployeeRoleDot model, Guid TenantId)
        {
            Guid id = (string.IsNullOrEmpty(model.Id) ? Guid.NewGuid() : new Guid(model.Id));
            return new EmployeeRoleMapping
            {
                Id = id,
                RoleId = model.RoleId,
                EmployeeId = model.EmployeeId,
                IsEnabled = model.IsEnabled,
                TenantId = TenantId
            };
        }


        //public static EmployeeRole ToEmployeeRoleFromUpdateDto(this UpdateApplicationRoleDto model, int TenantId)
        //{
        //    return new EmployeeRole
        //    {
        //        Id = model.Id,
        //        Role = model.Role,
        //        Description = model.Description,
        //        Features = model.Features,
        //        TenantId = TenantId,
        //    };
        //}
    }
}
