using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace RobotNet10.FleetManager.Data;
///
/// Robot entity - Individual robot information
///
[Table("Robots")]
public class Robot
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public Guid Id { get; set; }
///
/// Robot identifier (serial number or unique identifier)
///
[Required]
[StringLength(64)]
public string RobotId { get; set; } = string.Empty;
///
/// Display name of the robot
///
[Required]
[StringLength(256)]
public string Name { get; set; } = string.Empty;
///
/// Foreign key to RobotModel
///
[Required]
public Guid ModelId { get; set; }
///
/// Foreign key to Map (optional)
///
public Guid? MapId { get; set; }
///
/// Created date
///
[Required]
public DateTime CreatedDate { get; set; } = DateTime.UtcNow;
///
/// Updated date
///
public DateTime? UpdatedDate { get; set; }
// Navigation properties
///
/// Robot model this robot belongs to
///
[ForeignKey(nameof(ModelId))]
public virtual RobotModel? Model { get; set; }
}