Initial commit

This commit is contained in:
2026-07-03 16:37:12 +07:00
commit 63b8c1ea8b
1931 changed files with 640587 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace RobotNet10.MapManager.Data;
/// <summary>
/// Layout version entity - Version history for each layout
/// Maps to VDMA LIF: layouts[].layoutVersion
/// </summary>
[Table("LayoutVersions")]
public class LayoutVersion
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public Guid Id { get; set; }
/// <summary>
/// Parent layout reference
/// </summary>
[Required]
public Guid LayoutId { get; set; }
/// <summary>
/// Version number (VDMA LIF: layoutVersion)
/// Suggested: "1", "2", "3" or "1.0", "1.1"
/// </summary>
[Required]
[StringLength(32)]
public string Version { get; set; } = string.Empty;
/// <summary>
/// Version description (VDMA LIF: layoutDescription)
/// </summary>
public string? LayoutDescription { get; set; }
/// <summary>
/// Creator of this version
/// </summary>
[StringLength(256)]
public string? CreatedBy { get; set; }
/// <summary>
/// Creation date
/// </summary>
[Required]
public DateTime CreatedDate { get; set; } = DateTime.UtcNow;
/// <summary>
/// Is this the active version?
/// Only ONE version can be active per layout
/// Active version is READ-ONLY
/// </summary>
[Required]
public bool IsActive { get; set; } = true;
// Navigation properties
[ForeignKey(nameof(LayoutId))]
public virtual Layout Layout { get; set; } = null!;
public virtual ICollection<LayoutLevel> Levels { get; set; } = new List<LayoutLevel>();
}