<commit_before>﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using PS.Mothership.Core.Common.Dto.Groups;
using PS.Mothership.Core.Common.Dto.Roles;
using PS.Mothership.Core.Common.Template.Usr;

namespace PS.Mothership.Core.Common.Dto.Login
{
    /// <summary>
    /// User Proile Dto
    /// </summary>
    /// <remarks>
    ///     1. For caching purpose, we use the object as cache key, if the client want
    ///     to ignore certain property which are not any value, decorate those properties
    ///     with JsonIgnore, as the cache server convert the object to json for generating key
    /// </remarks>
    [DataContract]
    public class UserProfileDto
    {        
        [DataMember]
        public Guid UserGuid { get; set; }
        [DataMember]
        public string LoginName { get; set; }
        [DataMember]
        public string UserName { get; set; }

        [DataMember]
        public string FirstName { get; set; }
        [DataMember]
        public string LastName { get; set; }
        [DataMember]
        public string Initial { get; set; }
        [DataMember]
        public string Email { get; set; }
        [DataMember]
        public string OfficeDdi { get; set; }

        [DataMember]
        public bool IsLoggedIn { get; set; }
        [DataMember]
        public bool IsPersistent { get; set; }
        [DataMember]
        public bool IsValid { get; set; }
        [DataMember]
        public bool IsDefining { get; set; }
        [DataMember]
        public bool CanImpersonate { get; set; }
        [DataMember]
        public bool IsImpersonate { get; set; }        
        [DataMember]
        public string Message { get; set; }
        [DataMember]
        public int TotalCount { get; set; } // gives the total count based on selection criteria
        [DataMember]
        public string ValidationCode { get; set; }
        [DataMember]
        public ICollection<string> AlternateLoginNames { get; set; }         
        [DataMember]
        public string ChosenLoginName { get; set; }
        [DataMember]
        public ICollection<UserProfileDto> SimilarNames { get; set; }
                
        private Guid _sessionId = Guid.NewGuid();        
        [JsonIgnore]     
        [DataMember]
        public Guid SessionId
        {
            get { return _sessionId; }  
            set { _sessionId = value; }
        }


        [DataMember]
        public LoginResultEnum Status { get; set; }
        [DataMember]
        public UserTypeEnum UserType { get; set; }

        private StatusOptionFlagEnum _statusOptions = StatusOptionFlagEnum.None;
        [DataMember]
        public StatusOptionFlagEnum StatusOptions
        {
            get { return _statusOptions; }
            set { _statusOptions = value; }
        }
        
        private UserStatusEnum _userStatus = UserStatusEnum.NewHire;        
        [DataMember]
        public UserStatusEnum UserStatus
        {
            get { return _userStatus; }
            set { _userStatus = value; }

        }
        [DataMember]
        public bool UnlockAccount { get; set; }<commit_msg>Switched to use SESSION_MST identity.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using PS.Mothership.Core.Common.Dto.Groups;
using PS.Mothership.Core.Common.Dto.Roles;
using PS.Mothership.Core.Common.Template.Usr;

namespace PS.Mothership.Core.Common.Dto.Login
{
    /// <summary>
    /// User Proile Dto
    /// </summary>
    /// <remarks>
    ///     1. For caching purpose, we use the object as cache key, if the client want
    ///     to ignore certain property which are not any value, decorate those properties
    ///     with JsonIgnore, as the cache server convert the object to json for generating key
    /// </remarks>
    [DataContract]
    public class UserProfileDto
    {        
        [DataMember]
        public Guid UserGuid { get; set; }
        [DataMember]
        public string LoginName { get; set; }
        [DataMember]
        public string UserName { get; set; }

        [DataMember]
        public string FirstName { get; set; }
        [DataMember]
        public string LastName { get; set; }
        [DataMember]
        public string Initial { get; set; }
        [DataMember]
        public string Email { get; set; }
        [DataMember]
        public string OfficeDdi { get; set; }

        [DataMember]
        public bool IsLoggedIn { get; set; }
        [DataMember]
        public bool IsPersistent { get; set; }
        [DataMember]
        public bool IsValid { get; set; }
        [DataMember]
        public bool IsDefining { get; set; }
        [DataMember]
        public bool CanImpersonate { get; set; }
        [DataMember]
        public bool IsImpersonate { get; set; }        
        [DataMember]
        public string Message { get; set; }
        [DataMember]
        public int TotalCount { get; set; } // gives the total count based on selection criteria
        [DataMember]
        public string ValidationCode { get; set; }
        [DataMember]
        public ICollection<string> AlternateLoginNames { get; set; }         
        [DataMember]
        public string ChosenLoginName { get; set; }
        [DataMember]
        public ICollection<UserProfileDto> SimilarNames { get; set; }
                
        [JsonIgnore]     
        [DataMember]
        public Guid SessionId { get; set; }


        [DataMember]
        public LoginResultEnum Status { get; set; }
        [DataMember]
        public UserTypeEnum UserType { get; set; }

        private StatusOptionFlagEnum _statusOptions = StatusOptionFlagEnum.None;
        [DataMember]
        public StatusOptionFlagEnum StatusOptions
        {
            get { return _statusOptions; }
            set { _statusOptions = value; }
        }
        
        private UserStatusEnum _userStatus = UserStatusEnum.NewHire;        
        [DataMember]
        public UserStatusEnum UserStatus
        {
            get { return _userStatus; }
            set { _userStatus = value; }

        }
        [DataMember]
        public bool UnlockAccount { get; set; }
{'fraction_non_alphanumeric': 0.08465354456713074, 'fraction_numerical': 0.0003200512081933109, 'mean_word_length': 1.9328953542937588, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4334432', 'n_tokens_mistral': 1688, 'n_tokens_neox': 1673, 'n_words': 510}