using RobotNet.RobotShares.Enums;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace RobotNet.RobotManager.Data;

#nullable disable

[Table("RobotModels")]
public class RobotModel
{
    [Column("Id", TypeName = "uniqueidentifier")]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    [Key]
    [Required]
    public Guid Id { get; set; }

    [Column("ModelName", TypeName = "varchar(127)")]
    [Required]
    public string ModelName { get; set; }

    [Column("OriginX", TypeName = "float")]
    [Required]
    public double OriginX { get; set; }

    [Column("OriginY", TypeName = "float")]
    [Required]
    public double OriginY { get; set; }

    [Column("Length", TypeName = "float")]
    [Required]
    public double Length { get; set; }

    [Column("Width", TypeName = "float")]
    [Required]
    public double Width { get; set; }

    [Column("ImageWidth", TypeName = "int")]
    [Required]
    public int ImageWidth { get; set; }

    [Column("ImageHeight", TypeName = "int")]
    [Required]
    public int ImageHeight { get; set; }

    [Column("NavigationType", TypeName = "int")]
    [Required]
    public NavigationType NavigationType { get; set; }

    public virtual ICollection<Robot> Robots { get; } = [];
}
