♻️ Move the web reader from Sphere to Insight (w.i.p)
This commit is contained in:
@@ -1,20 +1,13 @@
|
||||
using System.Linq.Expressions;
|
||||
using DysonNetwork.Shared.Data;
|
||||
using DysonNetwork.Shared.Models;
|
||||
using DysonNetwork.Sphere.WebReader;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Design;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using NodaTime;
|
||||
using Quartz;
|
||||
|
||||
namespace DysonNetwork.Sphere;
|
||||
|
||||
public interface IIdentifiedResource
|
||||
{
|
||||
public string ResourceIdentifier { get; }
|
||||
}
|
||||
|
||||
public class AppDatabase(
|
||||
DbContextOptions<AppDatabase> options,
|
||||
IConfiguration configuration
|
||||
@@ -53,10 +46,6 @@ public class AppDatabase(
|
||||
public DbSet<SnFediverseRelationship> FediverseRelationships { get; set; } = null!;
|
||||
public DbSet<SnActivityPubDelivery> ActivityPubDeliveries { get; set; } = null!;
|
||||
|
||||
public DbSet<WebArticle> WebArticles { get; set; } = null!;
|
||||
public DbSet<WebFeed> WebFeeds { get; set; } = null!;
|
||||
public DbSet<WebFeedSubscription> WebFeedSubscriptions { get; set; } = null!;
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
optionsBuilder.UseNpgsql(
|
||||
@@ -140,13 +129,6 @@ public class AppDatabase(
|
||||
.HasForeignKey(m => m.SenderId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
modelBuilder.Entity<WebFeed>()
|
||||
.HasIndex(f => f.Url)
|
||||
.IsUnique();
|
||||
modelBuilder.Entity<WebArticle>()
|
||||
.HasIndex(a => a.Url)
|
||||
.IsUnique();
|
||||
|
||||
modelBuilder.Entity<SnFediverseActor>()
|
||||
.HasOne(a => a.Instance)
|
||||
.WithMany(i => i.Actors)
|
||||
|
||||
Reference in New Issue
Block a user