Files
MilkyShots/Lactose/Models/Face.cs
T
2024-11-11 16:48:23 +01:00

71 lines
1.9 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Lactose.Models;
/// <summary>
/// Represents a detected face in an image.
/// </summary>
public class Face {
/// <summary>
/// Gets or sets the unique identifier for the face.
/// </summary>
[Key]
public Guid Id { get; set; }
/// <summary>
/// Gets or sets the X-coordinate of the top-left corner of the bounding box.
/// </summary>
public int BoundingBoxX1 { get; set; }
/// <summary>
/// Gets or sets the Y-coordinate of the top-left corner of the bounding box.
/// </summary>
public int BoundingBoxY1 { get; set; }
/// <summary>
/// Gets or sets the X-coordinate of the bottom-right corner of the bounding box.
/// </summary>
public int BoundingBoxX2 { get; set; }
/// <summary>
/// Gets or sets the Y-coordinate of the bottom-right corner of the bounding box.
/// </summary>
public int BoundingBoxY2 { get; set; }
/// <summary>
/// Gets or sets the height of the image containing the face.
/// </summary>
public int ImageHeight { get; set; }
/// <summary>
/// Gets or sets the width of the image containing the face.
/// </summary>
public int ImageWidth { get; set; }
/// <summary>
/// Gets or sets the ID of the associated asset.
/// </summary>
[ForeignKey(nameof(Asset))]
public Guid? AssetId { get; set; }
/// <summary>
/// Gets or sets the ID of the associated person.
/// </summary>
[ForeignKey(nameof(Person))]
public Guid? PersonId { get; set; }
#region Navigation Properties
/// <summary>
/// Gets or sets the associated asset.
/// </summary>
public Asset? Asset { get; set; }
/// <summary>
/// Gets or sets the associated person.
/// </summary>
public Person? Person { get; set; }
#endregion
}