Initial commit

This commit is contained in:
2026-07-13 09:25:40 +07:00
parent c08ff54676
commit bccfb156d7
1938 changed files with 641646 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace RobotNet10.FleetManager.Data;
/// <summary>
/// Robot entity - Individual robot information
/// </summary>
[Table("Robots")]
public class Robot
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public Guid Id { get; set; }
/// <summary>
/// Robot identifier (serial number or unique identifier)
/// </summary>
[Required]
[StringLength(64)]
public string RobotId { get; set; } = string.Empty;
/// <summary>
/// Display name of the robot
/// </summary>
[Required]
[StringLength(256)]
public string Name { get; set; } = string.Empty;
/// <summary>
/// Foreign key to RobotModel
/// </summary>
[Required]
public Guid ModelId { get; set; }
/// <summary>
/// Foreign key to Map (optional)
/// </summary>
public Guid? MapId { 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>
/// Robot model this robot belongs to
/// </summary>
[ForeignKey(nameof(ModelId))]
public virtual RobotModel? Model { get; set; }
}