更新框架

This commit is contained in:
chfei committed 2026-10-27 14:35:03 +08:00
1 parent ef50fa0620
commit 84b28f9672
72 files changed
+2222 -282

No files matched your search

@@ -0,0 +1,46 @@
using System.ComponentModel.DataAnnotations;
using Store.Management.Api.Models;
namespace Store.Management.Api.Users;
public sealed class UserSearchRequest : PageRequest
{
[StringLength(100)] public string? Keyword { get; set; }
public int? GroupId { get; set; }
[StringLength(20)] public string? ParentUserName { get; set; }
}
public class UserEditRequest
{
[StringLength(50)] public string? NickName { get; set; }
[StringLength(30)] public string? Mobile { get; set; }
[StringLength(100)] public string? CompanyName { get; set; }
[StringLength(255)] public string? Notes { get; set; }
}
public sealed class UserCreateRequest : UserEditRequest
{
[Required, StringLength(20)] public string UserName { get; set; } = "";
[Required, StringLength(128, MinimumLength = 6)] public string Password { get; set; } = "";
[StringLength(20)] public string? ParentUserName { get; set; }
}
public sealed class UserUpdateRequest : UserEditRequest
{
[Range(1, int.MaxValue)] public int Id { get; set; }
}
/// <summary>管理端当前使用的用户资料字段;不接收密码。</summary>
public sealed class UserInfo
{
public int Id { get; init; }
public string UserName { get; init; } = "";
public string? NickName { get; init; }
public string? Mobile { get; init; }
public string? CompanyName { get; init; }
public string? Notes { get; init; }
public string? ParentUserName { get; init; }
public int GroupId { get; init; }
public decimal Points { get; init; }
public decimal? Balance { get; init; }
}