freetubesync/FreeTubeSync/Model/Video.cs
Mario Steele 21af6f4300 Update Video
Added Update() method to model.
2025-07-21 17:09:14 -05:00

31 lines
No EOL
1 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
using Microsoft.EntityFrameworkCore;
namespace FreeTubeSync.Model;
[SuppressMessage("ReSharper", "InconsistentNaming")]
public class Video
{
public string videoId { get; set; } = string.Empty;
public string title { get; set; } = string.Empty;
public string author { get; set; } = string.Empty;
public string authorId { get; set; } = string.Empty;
public string lengthSeconds { get; set; } = string.Empty;
public long pubished { get; set; }
public long timeAdded { get; set; }
[Key] public string playlistItemId { get; set; } = string.Empty;
public string type { get; set; } = string.Empty;
public void Update(Video other)
{
videoId = other.videoId;
title = other.title;
author = other.author;
authorId = other.authorId;
lengthSeconds = other.lengthSeconds;
pubished = other.pubished;
timeAdded = other.timeAdded;
type = other.type;
}
}