RobotApp/RobotApp.Common.Shares/Dtos/RobotPlcConfigDto.cs
Đăng Nguyễn 8736bad3e7 update
2025-11-06 14:14:10 +07:00

40 lines
1.1 KiB
C#

using System.ComponentModel.DataAnnotations;
namespace RobotApp.Common.Shares.Dtos;
#nullable disable
public record RobotPlcConfigDto
{
public Guid Id { get; set; }
[Required]
public string PLCAddress { get; set; }
[Range(1, 65535, ErrorMessage = "Value must be from 1 to 65535")]
public int PLCPort { get; set; }
[Range(1, 65535, ErrorMessage = "Value must be from 1 to 65535")]
public int PLCUnitId { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }
public bool IsActive { get; set; }
[Required]
public string ConfigName { get; set; }
public string Description { get; set; }
}
public record UpdateRobotPlcConfigDto
{
public string Description { get; set; }
public string PLCAddress { get; set; }
public int PLCPort { get; set; }
public int PLCUnitId { get; set; }
}
public record CreateRobotPlcConfigDto
{
public string ConfigName { get; set; }
public string Description { get; set; }
public string PLCAddress { get; set; }
public int PLCPort { get; set; }
public int PLCUnitId { get; set; }
}