using Hotline.Share.Enums.User;
using XF.Utility.EnumExtensions;

namespace Hotline.Share.Dtos.Roles
{
    public class RoleDto : AddRoleDto
    {
        public string Id { get; set; }
        public IReadOnlyList<string> AccountIds { get; set; }
        public string State { get; set; }

        /// <summary>
        /// 最近更新时间
        /// </summary>
        public DateTime? LastModificationTime { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreationTime { get; set; }

        public bool IsDeleted { get; set; }

        public string RoleTypeText => RoleType.GetDescription();

    }

    public class AddRoleDto
    {
        public string Name { get; set; }
        
        public string DisplayName { get; set; }

        public string? Description { get; set; }

        public ERoleType RoleType { get; set; }
    }

    public class UpdateRoleDto
    {
        public string Id { get; set; }
        
        public string DisplayName { get; set; }

        public string? Description { get; set; }

        public ERoleType RoleType { get; set; }
    }
}
