ImageInfo.cs 790 B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.ComponentModel.DataAnnotations;
  3. using System.ComponentModel.DataAnnotations.Schema;
  4. namespace Jellyfin.Data.Entities
  5. {
  6. public class ImageInfo
  7. {
  8. public ImageInfo(string path, int width, int height)
  9. {
  10. Path = path;
  11. Width = width;
  12. Height = height;
  13. LastModified = DateTime.UtcNow;
  14. }
  15. [Key]
  16. [Required]
  17. [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  18. public int Id { get; protected set; }
  19. [Required]
  20. public string Path { get; set; }
  21. [Required]
  22. public int Width { get; set; }
  23. [Required]
  24. public int Height { get; set; }
  25. [Required]
  26. public DateTime LastModified { get; set; }
  27. }
  28. }