aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Data/Entities/ImageInfo.cs
blob: 8bbce95e4b2e4b09748779cae292eece537fa0f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Jellyfin.Data.Entities
{
    public class ImageInfo
    {
        public ImageInfo(string path)
        {
            Path = path;
            LastModified = DateTime.UtcNow;
        }

        [Key]
        [Required]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; protected set; }

        [Required]
        [MaxLength(512)]
        [StringLength(512)]
        public string Path { get; set; }

        [Required]
        public DateTime LastModified { get; set; }
    }
}