Torrent stuff
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Elias Jansson
2025-08-19 15:56:52 +02:00
parent fb24ffbf03
commit 146c557c25
19 changed files with 4736 additions and 235 deletions

View File

@@ -14,7 +14,13 @@ namespace Aberwyn.Data
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
builder.Entity<TorrentItem>()
.HasIndex(t => t.InfoHash)
.IsUnique();
builder.Entity<TorrentItem>()
.Property(t => t.Status)
.HasConversion<string>();
builder.Entity<WeeklyMenu>().ToTable("WeeklyMenu");
builder.Entity<MealCategory>().HasData(
new MealCategory
@@ -52,7 +58,9 @@ namespace Aberwyn.Data
public DbSet<LabIngredient> LabIngredients { get; set; }
public DbSet<LabVersionIngredient> LabVersionIngredients { get; set; }
public DbSet<MealRating> MealRatings { get; set; }
public DbSet<TorrentItem> TorrentItems { get; set; }
public DbSet<RssFeed> RssFeeds { get; set; }
public DbSet<DownloadRule> DownloadRules { get; set; }
}
}