Started the Split

Split Json data models coming from REST Api, from the Database models
storing them in a SQLite database.
Work to re-engineer endpoints to use Database objects, and copy/update
data from the json objects.
More work is needed.
This commit is contained in:
Mario Steele 2025-07-22 17:03:33 -05:00
parent 157d46ee2e
commit 4985dc4179
36 changed files with 684 additions and 323 deletions

View file

@ -1,31 +0,0 @@
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;
}
}