using System.Text.Json.Serialization;

namespace DataSharing.Share.Dtos.YiBin.Enterprise
{
    /// <summary>
    /// token 返回值
    /// </summary>
    [Serializable]
    public class TokenEnterprise
    {
        /// <summary>
        /// 状态
        /// </summary>
        [JsonPropertyName("code")]
        public int Code { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [JsonPropertyName("success")]
        public bool Success { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [JsonPropertyName("data")]
        public TokenTokenEnterpriseInfo TokenInfo { get; set; }

        /// <summary>
        /// 消息
        /// </summary>
        [JsonPropertyName("msg")]
        public string Message { get; set; }
    }

    /// <summary>
    /// token 内容
    /// </summary>
    public class TokenTokenEnterpriseInfo
    {
        /// <summary>
        /// access_token
        /// </summary>
        [JsonPropertyName("access_token")]
        public string AccessToken { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [JsonPropertyName("refresh_token")]
        public string RefreshToken { get; set; }

        /// <summary>
        /// token类型
        /// </summary>
        [JsonPropertyName("token_type")]
        public string TokenType { get; set; }

        /// <summary>
        /// token有效期，单位秒
        /// </summary>
        [JsonPropertyName("expires_in")]
        public int ExpiresIn { get; set; }
    }
}
