Hold on Subscriptions
This commit is contained in:
@@ -8,6 +8,10 @@ public class ContentDbContext(
|
||||
{
|
||||
public const string SchemaName = "Content";
|
||||
|
||||
public DbSet<Content> Contents => Set<Content>();
|
||||
public DbSet<Creator> Creators => Set<Creator>();
|
||||
public DbSet<Subscription> Subscriptions => Set<Subscription>();
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.HasDefaultSchema("Content");
|
||||
@@ -24,21 +28,20 @@ public class ContentDbContext(
|
||||
|
||||
modelBuilder
|
||||
.Entity<Creator>()
|
||||
.OwnsOne<SocialNetworks>(x => x.SocialNetworks);
|
||||
.OwnsOne<SocialNetworks>(x => x.SocialNetworks)
|
||||
.ToTable(nameof(SocialNetworks));
|
||||
|
||||
modelBuilder
|
||||
.Entity<Creator>()
|
||||
.OwnsOne<ProfileColors>(x => x.ProfileColors);
|
||||
.OwnsOne<ProfileColors>(x => x.ProfileColors)
|
||||
.ToTable(nameof(ProfileColors));
|
||||
|
||||
modelBuilder
|
||||
.Entity<Creator>()
|
||||
.OwnsOne<StoredDataUrls>(x => x.StoredDataUrls);
|
||||
.OwnsOne<StoredDataUrls>(x => x.StoredDataUrls)
|
||||
.ToTable(nameof(StoredDataUrls));
|
||||
}
|
||||
|
||||
public DbSet<Content> Contents { get; init; } = null!;
|
||||
public DbSet<Creator> Creators { get; init; } = null!;
|
||||
|
||||
|
||||
public async Task<Creator?> FindByCreatorAliasAsync(
|
||||
string creatorAlias,
|
||||
CancellationToken cancellationToken = default)
|
||||
|
||||
9
src/Web/Features/Contents/Data/Subscription.cs
Normal file
9
src/Web/Features/Contents/Data/Subscription.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace Hutopy.Web.Features.Contents.Data;
|
||||
|
||||
public class Subscription
|
||||
{
|
||||
public Guid Id { get; init; }
|
||||
public Guid CreatorId { get; init; }
|
||||
public Guid CreatedBy { get; init; }
|
||||
public DateTimeOffset CreatedAt { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user