first commit -push

This commit is contained in:
dungtt
2025-10-15 15:15:53 +07:00
parent 674ae395be
commit a9577c5756
885 changed files with 74595 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace RobotNet.MapManager.Data;
#nullable disable
[Table("ElementModels")]
[Index(nameof(MapId), nameof(Name), Name = "IX_ElementModel_MapId_Name")]
public class ElementModel
{
[Column("Id", TypeName = "uniqueidentifier")]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Key]
[Required]
public Guid Id { get; set; }
[Column("MapId", TypeName = "uniqueidentifier")]
[Required]
public Guid MapId { get; set; }
[Column("Name", TypeName = "nvarchar(64)")]
public string Name { get; set; }
[Column("Width", TypeName = "float")]
[Required]
public double Width { get; set; }
[Column("Height", TypeName = "float")]
[Required]
public double Height { get; set; }
[Column("Image1Width", TypeName = "int")]
[Required]
public int Image1Width { get; set; }
[Column("Image1Height", TypeName = "int")]
[Required]
public int Image1Height { get; set; }
[Column("Image2Width", TypeName = "int")]
[Required]
public int Image2Width { get; set; }
[Column("Image2Height", TypeName = "int")]
[Required]
public int Image2Height { get; set; }
[Column("Content", TypeName = "nvarchar(max)")]
public string Content { get; set; }
public virtual ICollection<Element> Elements { get; } = [];
public Map Map { get; set; }
}