瀏覽代碼

Document ImageInfo.cs

Patrick Barron 4 年之前
父節點
當前提交
0fc1810c41
共有 1 個文件被更改,包括 39 次插入6 次删除
  1. 39 6
      Jellyfin.Data/Entities/ImageInfo.cs

+ 39 - 6
Jellyfin.Data/Entities/ImageInfo.cs

@@ -1,32 +1,65 @@
-#pragma warning disable CS1591
-
-using System;
+using System;
 using System.ComponentModel.DataAnnotations;
 using System.ComponentModel.DataAnnotations;
 using System.ComponentModel.DataAnnotations.Schema;
 using System.ComponentModel.DataAnnotations.Schema;
 
 
 namespace Jellyfin.Data.Entities
 namespace Jellyfin.Data.Entities
 {
 {
+    /// <summary>
+    /// An entity representing an image.
+    /// </summary>
     public class ImageInfo
     public class ImageInfo
     {
     {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="ImageInfo"/> class.
+        /// </summary>
+        /// <param name="path">The path.</param>
         public ImageInfo(string path)
         public ImageInfo(string path)
         {
         {
             Path = path;
             Path = path;
             LastModified = DateTime.UtcNow;
             LastModified = DateTime.UtcNow;
         }
         }
 
 
-        [Key]
-        [Required]
+        /// <summary>
+        /// Initializes a new instance of the <see cref="ImageInfo"/> class.
+        /// </summary>
+        /// <remarks>
+        /// Default constructor. Protected due to required properties, but present because EF needs it.
+        /// </remarks>
+        protected ImageInfo()
+        {
+        }
+
+        /// <summary>
+        /// Gets or sets the id.
+        /// </summary>
+        /// <remarks>
+        /// Identity, Indexed, Required.
+        /// </remarks>
         [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
         [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
         public int Id { get; protected set; }
         public int Id { get; protected set; }
 
 
+        /// <summary>
+        /// Gets or sets the user id.
+        /// </summary>
         public Guid? UserId { get; protected set; }
         public Guid? UserId { get; protected set; }
 
 
+        /// <summary>
+        /// Gets or sets the path of the image.
+        /// </summary>
+        /// <remarks>
+        /// Required.
+        /// </remarks>
         [Required]
         [Required]
         [MaxLength(512)]
         [MaxLength(512)]
         [StringLength(512)]
         [StringLength(512)]
         public string Path { get; set; }
         public string Path { get; set; }
 
 
-        [Required]
+        /// <summary>
+        /// Gets or sets the date last modified.
+        /// </summary>
+        /// <remarks>
+        /// Required.
+        /// </remarks>
         public DateTime LastModified { get; set; }
         public DateTime LastModified { get; set; }
     }
     }
 }
 }