You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.0 KiB
33 lines
1.0 KiB
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Znyc.Dispatching.Application
|
|
{
|
|
public class EmployeeAddInput
|
|
{
|
|
/// <summary>
|
|
/// 员工名
|
|
/// </summary>
|
|
[Required(ErrorMessage = "员工名不能为空!")]
|
|
public string EmployeeName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 手机号
|
|
/// </summary>
|
|
[Required(ErrorMessage = "请输入手机号")]
|
|
[MaxLength(11, ErrorMessage = "手机号不能超过11位")]
|
|
[RegularExpression("^[1][3,4,5,6,7,8,9][0-9]{9}$", ErrorMessage = "请输入正确的手机号码")]
|
|
public string EmployeePhone { get; set; }
|
|
|
|
/// <summary>
|
|
/// 角色
|
|
/// </summary>
|
|
public int RoleId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 角色名称
|
|
/// </summary>
|
|
[Required(ErrorMessage = "角色名称不能为空!")]
|
|
[MaxLength(20, ErrorMessage = "角色名称不得超过8个字")]
|
|
public string RoleName { get; set; }
|
|
}
|
|
}
|