[DB] Auto update datetimes on entities

This commit is contained in:
max
2025-09-02 16:01:07 +02:00
parent c30e503642
commit d98a99d145
4 changed files with 31 additions and 6 deletions

View File

@@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations;
namespace Manager.Data.Entities.LibraryContext;
public class CaptionEntity
public class CaptionEntity : DateTimeBase
{
[MaxLength(DataConstants.DbContext.DefaultDbStringSize)]
public required string MediaId { get; set; }

View File

@@ -2,13 +2,10 @@ using System.ComponentModel.DataAnnotations;
namespace Manager.Data.Entities.LibraryContext.Join;
public class PlaylistMedia
public class PlaylistMedia : DateTimeBase
{
[MaxLength(DataConstants.DbContext.DefaultDbStringSize)]
public required string PlaylistId { get; set; }
[MaxLength(DataConstants.DbContext.DefaultDbStringSize)]
public required string MediaId { get; set; }
public DateTime DateAddedUtc { get; set; }
public DateTime DateModifiedUtc { get; set; }
}

View File

@@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations;
namespace Manager.Data.Entities.LibraryContext;
public class MediaFormatEntity
public class MediaFormatEntity : DateTimeBase
{
[MaxLength(DataConstants.DbContext.DefaultDbStringSize)]
public required string MediaId { get; set; }