using YBEE.EQM.Core;

namespace YBEE.EQM.Application;

/// <summary>
/// 用户输出参数
/// </summary>
public class SysUserOutput
{
    /// <summary>
    /// 主键
    /// </summary>
    [Required]
    public int Id { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    [Required]
    public string Name { get; set; }
    /// <summary>
    /// 机构ID
    /// </summary>
    [Required]
    public short SysOrgId { get; set; }
    /// <summary>
    /// 头像地址
    /// </summary>
    public string Avatar { get; set; }
    /// <summary>
    /// 手机
    /// </summary>
    public string Mobile { get; set; }
    /// <summary>
    /// 电子邮箱
    /// </summary>
    public string Email { get; set; }
    /// <summary>
    /// 工号
    /// </summary>
    public string JobNumber { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }

    /// <summary>
    /// 账号
    /// </summary>
    public string Account { get; set; }
    /// <summary>
    /// 最后登录IP
    /// </summary>
    public string LastLoginIp { get; set; }
    /// <summary>
    /// 最后登录时间
    /// </summary>
    public DateTime? LastLoginTime { get; set; }
    /// <summary>
    /// 用户自定义配置
    /// </summary>
    public string Config { get; set; }

    /// <summary>
    /// 是否已激活
    /// </summary>
    [Required]
    public bool IsActivated { get; set; }
    /// <summary>
    /// 激活时间
    /// </summary>
    public DateTime? ActivateTime { get; set; }

    /// <summary>
    /// 状态
    /// </summary>
    public virtual CommonStatus Status { get; set; }

    /// <summary>
    /// 多对多（角色）
    /// </summary>
    public List<SysRoleOutput> SysRoles { get; set; }
    /// <summary>
    /// 一对一引用（机构）
    /// </summary>
    public SysOrg SysOrg { get; set; }
}

/// <summary>
/// 最小用户输出信息
/// </summary>
public class SysUserLiteOutput
{
    /// <summary>
    /// 用户ID
    /// </summary>
    [Required]
    public int Id { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    [Required]
    public string Name { get; set; }
}

public class SysUserSimpleOutput
{
    /// <summary>
    /// 用户ID
    /// </summary>
    [Required]
    public int Id { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    [Required]
    public string Name { get; set; }
    /// <summary>
    /// 账号
    /// </summary>
    [Required]
    public string Account { get; set; }
    /// <summary>
    /// 手机
    /// </summary>
    public string Mobile { get; set; }
    /// <summary>
    /// 电子邮箱
    /// </summary>
    public string Email { get; set; }
    /// <summary>
    /// 工号
    /// </summary>
    public string JobNumber { get; set; }
    /// <summary>
    /// 机构ID
    /// </summary>
    [Required]
    public short SysOrgId { get; set; }
    /// <summary>
    /// 机构
    /// </summary>
    [Required]
    public SysOrgLiteOutput SysOrg { get; set; }
}