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

namespace Waste.Application
{
    /// <summary>
    /// 用户登录
    /// </summary>
    public class LoginModel
    {
        /// <summary>
        /// 用户名
        /// </summary>
        [Required(ErrorMessage ="请先输入用户名")]
        public string username { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [Required(ErrorMessage = "请先输入密码")]
        public string pwd { get; set; }
        /// <summary>
        /// 验证码
        /// </summary>
        public string code { get; set; } = "";
    }
    /// <summary>
    /// 账户登录成功之后的信息
    /// </summary>
    public class UserInfo
    { 
        /// <summary>
        /// 账户类型
        /// </summary>
        public int AccountType { get; set; }
        /// <summary>
        /// 用户ID
        /// </summary>
        public Guid UserId { get; set; }

        /// <summary>
        /// 用户实际名称
        /// </summary>
        public string RealName { get; set; }

        /// <summary>
        /// 角色ID
        /// </summary>
        public Guid RoleId { get; set; }
        /// <summary>
        /// 是否为超级管理员
        /// </summary>
        public bool IsSuper { get; set; } = false;

        /// <summary>
        /// 关联的商户ID
        /// </summary>
        public Guid BusinessId { get; set; }
    }
    /// <summary>
    /// 登录成功之后的返回信息
    /// </summary>
    public class LoginSuccessInfo
    {
        /// <summary>
        /// 访问token
        /// </summary>
        public string token { get; set; }
        /// <summary>
        /// 刷新token
        /// </summary>
        public string refreshtoken { get; set; }
    }
}
