commit 014422171289e64749534dfee52689e51a704d6f Author: Mario Steele Date: Sat Jul 19 04:02:09 2025 -0500 Initial Commit Inital Commit of Code base, nothing tested. diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..38bece4 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,25 @@ +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/.idea +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/azds.yaml +**/bin +**/charts +**/docker-compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f188de7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +bin/ +obj/ +/packages/ +.idea/ +riderModule.iml +/_ReSharper.Caches/ +FreeTubeSync.db diff --git a/FreeTubeSync.sln b/FreeTubeSync.sln new file mode 100644 index 0000000..e634bc5 --- /dev/null +++ b/FreeTubeSync.sln @@ -0,0 +1,21 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FreeTubeSync", "FreeTubeSync\FreeTubeSync.csproj", "{E55FECEB-2D88-4FD4-90BF-713EB30D60BB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{47A66AFA-4FD3-40F3-ADE0-27EE0527211B}" + ProjectSection(SolutionItems) = preProject + compose.yaml = compose.yaml + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E55FECEB-2D88-4FD4-90BF-713EB30D60BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E55FECEB-2D88-4FD4-90BF-713EB30D60BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E55FECEB-2D88-4FD4-90BF-713EB30D60BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E55FECEB-2D88-4FD4-90BF-713EB30D60BB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/FreeTubeSync/Database/DataContext.cs b/FreeTubeSync/Database/DataContext.cs new file mode 100644 index 0000000..48ca94d --- /dev/null +++ b/FreeTubeSync/Database/DataContext.cs @@ -0,0 +1,37 @@ +using FreeTubeSync.Model; +using Microsoft.EntityFrameworkCore; + +namespace FreeTubeSync.Database; + +public class DataContext : DbContext +{ + public DataContext(DbContextOptions options) : base(options) + { + + } + + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + optionsBuilder.UseSqlite("Data Source=FreeTubeSync.db"); + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.Entity() + .ToTable("Settings") + .HasKey(s => s._id); + + modelBuilder.Entity() + .Property(s => s.ValueJson) + .HasColumnName("Value") + .IsRequired(); + } + + public DbSet Histories { get; set; } + public DbSet Playlists { get; set; } + public DbSet Profiles { get; set; } + public DbSet SearchHistories { get; set; } + public DbSet Settings { get; set; } + public DbSet Subscriptions { get; set; } + public DbSet