支持 AdvisorCode 写入 CustomerService=Account;补充 employee_position/employee_job_level 初始 SQL。 Co-authored-by: Cursor <cursoragent@cursor.com>
128 lines
3.1 KiB
C#
128 lines
3.1 KiB
C#
using System.ComponentModel.DataAnnotations;
|
||
using Oms.Domain.CustomersAggregate.Enums;
|
||
|
||
namespace Oms.Application.Dtos.Customers;
|
||
|
||
/// <summary>
|
||
/// 创建客户入参。
|
||
/// </summary>
|
||
public class CreateCustomerInput
|
||
{
|
||
/// <summary>
|
||
/// 客户编号(留空时系统自动生成,规则:年码+月码+序号,如 AF0A1)。
|
||
/// </summary>
|
||
[StringLength(32)]
|
||
public string? CustomerCode { get; set; }
|
||
|
||
/// <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>
|
||
[Required]
|
||
[EmailAddress]
|
||
[StringLength(64)]
|
||
public string Email { get; set; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 微信头像地址。
|
||
/// </summary>
|
||
[StringLength(255)]
|
||
public string? WechatAvatar { get; set; }
|
||
|
||
/// <summary>
|
||
/// 微信昵称。
|
||
/// </summary>
|
||
[StringLength(64)]
|
||
public string? WechatNickname { get; set; }
|
||
|
||
/// <summary>
|
||
/// 密码。
|
||
/// </summary>
|
||
[Required]
|
||
[StringLength(64, MinimumLength = 6)]
|
||
public string Password { get; set; } = string.Empty;
|
||
|
||
/// <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; }
|
||
|
||
/// <summary>
|
||
/// 注册邀请码(引荐绑定,仅新客户有效)。
|
||
/// </summary>
|
||
[StringLength(16)]
|
||
public string? InviteCode { get; set; }
|
||
|
||
/// <summary>
|
||
/// 顾问邀请码(所属顾问绑定,值为员工 Account;仅 CustomerService 为空时生效)。
|
||
/// </summary>
|
||
[StringLength(64)]
|
||
public string? AdvisorCode { get; set; }
|
||
|
||
}
|