83 lines
1.7 KiB
C#
83 lines
1.7 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace SimpleAdmin.Api.WeChat.Dtos;
|
|
|
|
public class WxLoginQrcodeOutput
|
|
{
|
|
public string QrCodeUrl { get; set; } = string.Empty;
|
|
|
|
public int ExpiresIn { get; set; } = 600;
|
|
}
|
|
|
|
public class WeChatOAuthCodeInput
|
|
{
|
|
[Required]
|
|
public string Code { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class WeChatOAuthUserInfoOutput
|
|
{
|
|
public string Openid { get; set; } = string.Empty;
|
|
|
|
public string? Nickname { get; set; }
|
|
|
|
public int Sex { get; set; }
|
|
|
|
public string? Province { get; set; }
|
|
|
|
public string? City { get; set; }
|
|
|
|
public string? Country { get; set; }
|
|
|
|
public string? Headimgurl { get; set; }
|
|
|
|
public string? Unionid { get; set; }
|
|
|
|
public bool AlreadyBound { get; set; }
|
|
}
|
|
|
|
public class WeChatProfileInput
|
|
{
|
|
[Required]
|
|
public string Openid { get; set; } = string.Empty;
|
|
|
|
public string? Nickname { get; set; }
|
|
|
|
public string? Avatar { get; set; }
|
|
|
|
public string? Unionid { get; set; }
|
|
}
|
|
|
|
public class WeChatCustomerRegisterInput
|
|
{
|
|
[Required]
|
|
public string CustomerCode { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public string CustomerName { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public string Phone { get; set; } = string.Empty;
|
|
|
|
public string? Email { get; set; }
|
|
|
|
[Required]
|
|
[MinLength(6)]
|
|
public string Password { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public WeChatProfileInput Wechat { get; set; } = new();
|
|
}
|
|
|
|
public class WeChatCustomerBindInput
|
|
{
|
|
[Required]
|
|
public string Account { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public string Password { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public WeChatProfileInput Wechat { get; set; } = new();
|
|
}
|