30 lines
997 B
C#
30 lines
997 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using PowderCoating.Core.Enums;
|
|
|
|
namespace PowderCoating.Application.DTOs.ShopWorker;
|
|
|
|
public class UpdateShopWorkerDto
|
|
{
|
|
public int Id { get; set; }
|
|
|
|
[Required(ErrorMessage = "Worker name is required")]
|
|
[StringLength(100, ErrorMessage = "Name cannot exceed 100 characters")]
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
[Required(ErrorMessage = "Role is required")]
|
|
public ShopWorkerRole Role { get; set; }
|
|
|
|
[Phone(ErrorMessage = "Invalid phone number format")]
|
|
[StringLength(20, ErrorMessage = "Phone cannot exceed 20 characters")]
|
|
public string? Phone { get; set; }
|
|
|
|
[EmailAddress(ErrorMessage = "Invalid email address format")]
|
|
[StringLength(100, ErrorMessage = "Email cannot exceed 100 characters")]
|
|
public string? Email { get; set; }
|
|
|
|
public bool IsActive { get; set; }
|
|
|
|
[StringLength(500, ErrorMessage = "Notes cannot exceed 500 characters")]
|
|
public string? Notes { get; set; }
|
|
}
|