Files
BQP/srcs/RobotNet10/FleetManager/RobotNet10.FleetManager/Data/RobotModel.cs
2026-07-13 09:25:40 +07:00

89 lines
2.2 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using RobotNet10.FleetManager.Shared.Enums;
namespace RobotNet10.FleetManager.Data;
/// <summary>
/// Robot model entity - Master data for robot types
/// </summary>
[Table("RobotModels")]
public class RobotModel
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public Guid Id { get; set; }
/// <summary>
/// Model name
/// </summary>
[Required]
[StringLength(256)]
public string ModelName { get; set; } = string.Empty;
/// <summary>
/// Robot length in meters
/// </summary>
[Required]
public double Length { get; set; }
/// <summary>
/// Robot width in meters
/// </summary>
[Required]
public double Width { get; set; }
/// <summary>
/// Image width in pixels
/// </summary>
[Required]
public int ImageWidth { get; set; }
/// <summary>
/// Image height in pixels
/// </summary>
[Required]
public int ImageHeight { get; set; }
/// <summary>
/// Navigation point X coordinate (relative to robot center) in meters
/// </summary>
[Required]
public double NavigationPointX { get; set; }
/// <summary>
/// Navigation point Y coordinate (relative to robot center) in meters
/// </summary>
[Required]
public double NavigationPointY { get; set; }
/// <summary>
/// Navigation type
/// </summary>
[Required]
public NavigationType NavigationType { get; set; }
/// <summary>
/// Foreign key to VehicleType (in MapManager database)
/// Links RobotModel to VehicleType for map filtering
/// </summary>
public Guid? VehicleTypeId { get; set; }
/// <summary>
/// Created date
/// </summary>
[Required]
public DateTime CreatedDate { get; set; } = DateTime.UtcNow;
/// <summary>
/// Updated date
/// </summary>
public DateTime? UpdatedDate { get; set; }
// Navigation properties
/// <summary>
/// Collection of robots using this model
/// </summary>
public virtual ICollection<Robot> Robots { get; set; } = [];
}