admin/src/Oms.Application/Dtos/Customers/CreateCustomerInput.cs
zzh e875f0c012 feat: price-check by cargo type and warehouse, customer auto-code, track apiCode
Support multi cargo-type and warehouse combinations in price check billing. Auto-generate customer codes (W+yyMM+seq) on create/register; require email. Use order DownstreamSupplierCode as track UpsertSmallBag apiCode.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 18:40:10 +08:00

105 lines
2.4 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 CreateCustomerInput
{
/// <summary>
/// 客户编号(留空时系统自动生成,规则 W+年份后2位+月份2位+3位顺序)。
/// </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>
/// 客户分组。
/// </summary>
public CustomerGroup? CustomerGroup { get; set; }
}