66 lines
1.2 KiB
C#
66 lines
1.2 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Blahblah.FlowerStory.Server.Controller;
|
|
|
|
partial class UserApiController
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// 登录参数
|
|
/// </summary>
|
|
public record LoginParamter
|
|
{
|
|
/// <summary>
|
|
/// 用户 id
|
|
/// </summary>
|
|
[Required]
|
|
public required string Id { get; init; }
|
|
|
|
/// <summary>
|
|
/// 密码
|
|
/// </summary>
|
|
[Required]
|
|
public required string Password { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 用户注册参数
|
|
/// </summary>
|
|
public record UserParameter : UpdateParameter
|
|
{
|
|
/// <summary>
|
|
/// 用户 id
|
|
/// </summary>
|
|
[Required]
|
|
public required string Id { get; init; }
|
|
|
|
/// <summary>
|
|
/// 密码
|
|
/// </summary>
|
|
[Required]
|
|
public required string Password { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 用户修改参数
|
|
/// </summary>
|
|
public record UpdateParameter
|
|
{
|
|
/// <summary>
|
|
/// 用户名
|
|
/// </summary>
|
|
[Required]
|
|
public required string UserName { get; init; }
|
|
|
|
/// <summary>
|
|
/// 邮箱
|
|
/// </summary>
|
|
public string? Email { get; init; }
|
|
|
|
/// <summary>
|
|
/// 联系电话
|
|
/// </summary>
|
|
public string? Mobile { get; init; }
|
|
}
|