using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LHDN.CRM.Models.ViewModels
{
    public class UserProfileUpdateViewModel
    {
        public UserProfileViewModel UserProfile { get; set; }
        public List<ChangeHistoryUpdateViewModel> ChangeHistory { get; set; }
    }

    public class UserProfileViewModel 
    {
        public long UserProfileID { get; set; }
        public string LoginID { get; set; }
        public string DisplayName { get; set; }
        public string Email { get; set; }
        public string NRIC { get; set; }
        public string Gred { get; set; }
        public int? UnitID { get; set; }
        public int? AdditionalUnitID { get; set; }
        public string AdditionalUnitIDMultiple { get; set; }
        public string UnitName { get; set; }
        public string AdditionalInfo { get; set; }
        public long? ManagerUserProfileID { get; set; }
        public string ManagerDisplayName { get; set; }
        public int JawatanID { get; set; } // CR Jan2020 (Chew)
        public string ShortName { get; set; }
        public string DefaultRolesID { get; set; }
        public string AdditionalRolesID { get; set; }
        public string RemoveDefaultRolesID { get; set; }
        public string RemoveAdditionalRolesID { get; set; }
        public int? RemoveAdditionalUnitID { get; set; }
        public string RemoveUnitAndRoles { get; set; }
        public bool IsActive { get; set; }
        public string CreatedBy { get; set; }
        public DateTime CreatedDateTime { get; set; }
        public string LastUpdatedBy { get; set; }
        public DateTime LastUpdatedDateTime { get; set; }
        public DateTime? ExpiryDate { get; set; }
        public DateTime? DormantDateFrom { get; set; }
        public DateTime? DormantDateTo { get; set; }
        public int ActiveCondition { get; set; }
        public string ActiveConditionDesc { get; set; }
        public long ActivePeriodID { get; set; }
        public long? AdditionalManagerID { get; set; }
        public List<UserRole> UserRoles { get; set; }
        public List<WorkflowUserViewModel> ChangeUnitAdditionManager { get; set; }
        public List<RemoveUserManagerViewModel> RemoveUnitAdditionManager { get; set; }
        public List<UserProfileManager> UserProfileManager { get; set; }

        public List<UserFunctionalRoleMember> UserFunctionRoles { get; set; }

        public List<UserFunctionalRoleMember> UserAdditionalFunctionRoles { get; set; }

        public List<WorkflowUserViewModel> UserAdditionalUnitAndRoles { get; set; }
        public UserActiveConditionViewModel UserActiveCondition { get; set; }

        public List<UserProfileManager> AdditionalUnitUserProfileManager { get; set; }
    }

    public class UserProfileManager
    {
        public long UserProfileID { get; set; }
        public string LoginID { get; set; }
        public string DisplayName { get; set; }
        public string Email { get; set; }
        public string AdditionalInfo { get; set; }
        public bool IsActive { get; set; }
        public int UnitID { get; set; }
    }

    public class UserFunctionalRoleMember
    {
        public int FunctionalRoleID { get; set; }
        public string RoleName { get; set; }
        public string RoleCode { get; set; }
        public bool IsActive { get; set; }
        public int UnitID { get; set; }
    }

    public class UserActiveConditionViewModel
    {
        public long ActivePeriodID { get; set; }
        public long UserProfileID { get; set; }
        public int ActiveCondition { get; set; }
        public string ActiveConditionDesc { get; set; }
        public DateTime? DormantDateFrom { get; set; }
        public DateTime? DormantDateTo { get; set; }
        public DateTime? ExpiryDate { get; set; }
    }
}
