using System.ComponentModel.DataAnnotations;
using Oms.Domain.CustomersAggregate.Enums;
namespace Oms.Application.Dtos.Customers;
///
/// 创建客户入参。
///
public class CreateCustomerInput
{
///
/// 客户编号(留空时系统自动生成,规则 W+年份后2位+月份2位+3位顺序)。
///
[StringLength(32)]
public string? CustomerCode { get; set; }
///
/// 客户名称。
///
[Required]
[StringLength(128)]
public string CustomerName { get; set; } = string.Empty;
///
/// 手机号。
///
[Required]
[StringLength(16)]
public string Phone { get; set; } = string.Empty;
///
/// 邮箱。
///
[Required]
[EmailAddress]
[StringLength(64)]
public string Email { get; set; } = string.Empty;
///
/// 微信头像地址。
///
[StringLength(255)]
public string? WechatAvatar { get; set; }
///
/// 微信昵称。
///
[StringLength(64)]
public string? WechatNickname { get; set; }
///
/// 密码。
///
[Required]
[StringLength(64, MinimumLength = 6)]
public string Password { get; set; } = string.Empty;
///
/// 账户余额。
///
[Range(typeof(decimal), "0", "999999999999")]
public decimal Balance { get; set; }
///
/// 总额度。
///
[Range(typeof(decimal), "0", "999999999999")]
public decimal TotalQuota { get; set; }
///
/// 已用额度。
///
[Range(typeof(decimal), "0", "999999999999")]
public decimal UsedQuota { get; set; }
///
/// 状态。
///
public CustomerStatus Status { get; set; } = CustomerStatus.Normal;
///
/// 备注。
///
[StringLength(512)]
public string? Remark { get; set; }
///
/// 销售人员。
///
[StringLength(32)]
public string? Salesman { get; set; }
///
/// 客服人员。
///
[StringLength(32)]
public string? CustomerService { get; set; }
///
/// 客户分组。
///
public CustomerGroup? CustomerGroup { get; set; }
}