更新代码

This commit is contained in:
chfei committed 2026-11-13 19:19:33 +08:00
1 parent 127fc22de5
commit 45829fa267
26 files changed
+139 -90

No files matched your search

@@ -1,3 +1,4 @@
using Store.Management.Models;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using Store.Management.Api.Models;
@@ -32,12 +33,6 @@ public sealed class UserCreateRequest : UserEditRequest
public sealed record ChangePasswordRequest(string UserName, string NewPassword, string? OldPassword = null);
public enum UserAdminLevel : short
{
[System.ComponentModel.Description("普通用户")] Normal = 0,
[System.ComponentModel.Description("超级管理员")] SuperAdmin = 1
}
public sealed class UserUpdateRequest : UserEditRequest
{
[Range(1, int.MaxValue)] public int Id { get; set; }
@@ -57,28 +52,3 @@ public sealed class UserBillingUpdateRequest
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public decimal? SyncLogisticsPerOrder { 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; }
[System.Text.Json.Serialization.JsonIgnore]
public UserGroup? Group => GroupId is >= byte.MinValue and <= byte.MaxValue ? (UserGroup)GroupId : null;
public UserAdminLevel? SaLevel { get; init; }
public string? OemId { get; init; }
public string? Authority { get; init; }
public int ShopPointsPerMonth { get; init; }
public decimal? PostagePerOrder { get; init; }
public decimal? RefundPostagePerOrder { get; init; }
public decimal? GiftOemAmountPerOrder { get; init; }
public decimal? SyncLogisticsPerOrder { get; init; }
public decimal Points { get; init; }
public decimal? Balance { get; init; }
}