admin/src/Oms.Application/Dtos/Customers/UpdateCustomerInput.cs
zzh 206dc3ef3c feat: ??????????????????????????
?????????????????????????????????? SQL?

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 15:16:55 +08:00

115 lines
2.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.ComponentModel.DataAnnotations;
using Oms.Domain.CustomersAggregate.Enums;
namespace Oms.Application.Dtos.Customers;
/// <summary>
/// 更新客户入参。
/// </summary>
public class UpdateCustomerInput
{
/// <summary>
/// 主键。
/// </summary>
[Required]
public int Id { get; set; }
/// <summary>
/// 客户编号。
/// </summary>
[Required]
[StringLength(32)]
public string CustomerCode { get; set; } = string.Empty;
/// <summary>
/// 客户名称。
/// </summary>
[Required]
[StringLength(128)]
public string CustomerName { get; set; } = string.Empty;
/// <summary>
/// 手机号。
/// </summary>
[Required]
[StringLength(16)]
public string Phone { get; set; } = string.Empty;
/// <summary>
/// 邮箱。
/// </summary>
[EmailAddress]
[StringLength(64)]
public string? Email { get; set; }
/// <summary>
/// 微信头像地址。
/// </summary>
[StringLength(255)]
public string? WechatAvatar { get; set; }
/// <summary>
/// 微信昵称。
/// </summary>
[StringLength(64)]
public string? WechatNickname { get; set; }
/// <summary>
/// 账户余额。
/// </summary>
[Range(typeof(decimal), "0", "999999999999")]
public decimal Balance { get; set; }
/// <summary>
/// 总额度。
/// </summary>
[Range(typeof(decimal), "0", "999999999999")]
public decimal TotalQuota { get; set; }
/// <summary>
/// 已用额度。
/// </summary>
[Range(typeof(decimal), "0", "999999999999")]
public decimal UsedQuota { get; set; }
/// <summary>
/// 状态。
/// </summary>
public CustomerStatus Status { get; set; } = CustomerStatus.Normal;
/// <summary>
/// 备注。
/// </summary>
[StringLength(512)]
public string? Remark { get; set; }
/// <summary>
/// 销售人员。
/// </summary>
[StringLength(32)]
public string? Salesman { get; set; }
/// <summary>
/// 所属顾问。
/// </summary>
[StringLength(32)]
public string? CustomerService { get; set; }
/// <summary>
/// 客户分组(遗留字段,计价优先 MemberLevelId)。
/// </summary>
public CustomerGroup? CustomerGroup { get; set; }
/// <summary>
/// 会员等级 Id。
/// </summary>
public int? MemberLevelId { get; set; }
/// <summary>
/// 价区键(卖价 CustomerGroupValues JSON 键)。空则回落「普通客户」。
/// </summary>
[StringLength(64)]
public string? PriceTierKey { get; set; }
}