Renames SocialNetworks to Socials
This commit is contained in:
@@ -44,8 +44,8 @@ public class ContentDbContext(
|
||||
|
||||
modelBuilder
|
||||
.Entity<Creator>()
|
||||
.OwnsOne<SocialNetworks>(x => x.SocialNetworks)
|
||||
.ToTable(nameof(SocialNetworks));
|
||||
.OwnsOne<Socials>(x => x.Socials)
|
||||
.ToTable(nameof(Socials));
|
||||
|
||||
modelBuilder
|
||||
.Entity<Creator>()
|
||||
|
||||
@@ -10,7 +10,7 @@ public class Creator
|
||||
[MaxLength(255)] public string Name { get; set; } = null!;
|
||||
|
||||
public About About { get; set; } = new();
|
||||
public SocialNetworks SocialNetworks { get; set; } = new();
|
||||
public Socials Socials { get; set; } = new();
|
||||
public ProfileColors ProfileColors { get; set; } = new();
|
||||
public StoredDataUrls StoredDataUrls { get; set; } = new();
|
||||
}
|
||||
@@ -29,7 +29,7 @@ public class ProfileColors
|
||||
[MaxLength(9)] public string? Menu { get; set; }
|
||||
}
|
||||
|
||||
public class SocialNetworks
|
||||
public class Socials
|
||||
{
|
||||
[MaxLength(255)] public string? FacebookUrl { get; set; }
|
||||
[MaxLength(255)] public string? InstagramUrl { get; set; }
|
||||
|
||||
@@ -34,14 +34,14 @@ public class ChangeSocialsHandler(
|
||||
c => c.Id == request.CreatorId,
|
||||
cancellationToken: ct);
|
||||
|
||||
creator.SocialNetworks.FacebookUrl = request.FacebookUrl;
|
||||
creator.SocialNetworks.InstagramUrl = request.InstagramUrl;
|
||||
creator.SocialNetworks.XUrl = request.XUrl;
|
||||
creator.SocialNetworks.LinkedInUrl = request.LinkedInUrl;
|
||||
creator.SocialNetworks.TikTokUrl = request.TikTokUrl;
|
||||
creator.SocialNetworks.YoutubeUrl = request.YoutubeUrl;
|
||||
creator.SocialNetworks.RedditUrl = request.RedditUrl;
|
||||
creator.SocialNetworks.WebsiteUrl = request.WebsiteUrl;
|
||||
creator.Socials.FacebookUrl = request.FacebookUrl;
|
||||
creator.Socials.InstagramUrl = request.InstagramUrl;
|
||||
creator.Socials.XUrl = request.XUrl;
|
||||
creator.Socials.LinkedInUrl = request.LinkedInUrl;
|
||||
creator.Socials.TikTokUrl = request.TikTokUrl;
|
||||
creator.Socials.YoutubeUrl = request.YoutubeUrl;
|
||||
creator.Socials.RedditUrl = request.RedditUrl;
|
||||
creator.Socials.WebsiteUrl = request.WebsiteUrl;
|
||||
|
||||
await context.SaveChangesAsync(ct);
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class GetCreatorByAliasHandler(
|
||||
CreatedAt = creator.CreatedAt,
|
||||
Name = creator.Name,
|
||||
About = creator.About,
|
||||
SocialNetworks = creator.SocialNetworks,
|
||||
Socials = creator.Socials,
|
||||
ProfileColors = creator.ProfileColors,
|
||||
StoredDataUrls = creator.StoredDataUrls,
|
||||
SubscriberCount = subscriberCount,
|
||||
|
||||
@@ -9,7 +9,7 @@ public class CreatorModel
|
||||
public DateTimeOffset CreatedAt { get; set; }
|
||||
public string Name { get; set; }
|
||||
public About About { get; set; }
|
||||
public SocialNetworks SocialNetworks { get; set; }
|
||||
public Socials Socials { get; set; }
|
||||
public ProfileColors ProfileColors { get; set; }
|
||||
public StoredDataUrls StoredDataUrls { get; set; }
|
||||
public int SubscriberCount { get; set; }
|
||||
|
||||
@@ -12,7 +12,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
namespace Hutopy.Web.Features.Contents.Migrations
|
||||
{
|
||||
[DbContext(typeof(ContentDbContext))]
|
||||
[Migration("20240805012309_Initial")]
|
||||
[Migration("20240806041040_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@@ -163,7 +163,7 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
.HasForeignKey("CreatorId");
|
||||
});
|
||||
|
||||
b.OwnsOne("Hutopy.Web.Features.Contents.Data.SocialNetworks", "SocialNetworks", b1 =>
|
||||
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Socials", "Socials", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("CreatorId")
|
||||
.HasColumnType("uuid");
|
||||
@@ -202,7 +202,7 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
|
||||
b1.HasKey("CreatorId");
|
||||
|
||||
b1.ToTable("SocialNetworks", "Content");
|
||||
b1.ToTable("Socials", "Content");
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("CreatorId");
|
||||
@@ -235,7 +235,7 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
b.Navigation("ProfileColors")
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("SocialNetworks")
|
||||
b.Navigation("Socials")
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("StoredDataUrls")
|
||||
@@ -79,7 +79,7 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SocialNetworks",
|
||||
name: "Socials",
|
||||
schema: "Content",
|
||||
columns: table => new
|
||||
{
|
||||
@@ -95,9 +95,9 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SocialNetworks", x => x.CreatorId);
|
||||
table.PrimaryKey("PK_Socials", x => x.CreatorId);
|
||||
table.ForeignKey(
|
||||
name: "FK_SocialNetworks_Creators_CreatorId",
|
||||
name: "FK_Socials_Creators_CreatorId",
|
||||
column: x => x.CreatorId,
|
||||
principalSchema: "Content",
|
||||
principalTable: "Creators",
|
||||
@@ -172,7 +172,7 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
schema: "Content");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SocialNetworks",
|
||||
name: "Socials",
|
||||
schema: "Content");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
@@ -160,7 +160,7 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
.HasForeignKey("CreatorId");
|
||||
});
|
||||
|
||||
b.OwnsOne("Hutopy.Web.Features.Contents.Data.SocialNetworks", "SocialNetworks", b1 =>
|
||||
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Socials", "Socials", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("CreatorId")
|
||||
.HasColumnType("uuid");
|
||||
@@ -199,7 +199,7 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
|
||||
b1.HasKey("CreatorId");
|
||||
|
||||
b1.ToTable("SocialNetworks", "Content");
|
||||
b1.ToTable("Socials", "Content");
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("CreatorId");
|
||||
@@ -232,7 +232,7 @@ namespace Hutopy.Web.Features.Contents.Migrations
|
||||
b.Navigation("ProfileColors")
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("SocialNetworks")
|
||||
b.Navigation("Socials")
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("StoredDataUrls")
|
||||
|
||||
@@ -193,7 +193,7 @@ internal class TestDataSeeder(
|
||||
{
|
||||
BannerTop = "#A30E79", BannerBottom = "#6B0065", Accent = "#23393B", Menu = "#53B93B",
|
||||
},
|
||||
SocialNetworks =
|
||||
Socials =
|
||||
new()
|
||||
{
|
||||
XUrl = "https://twitter.com/Hutopyinc",
|
||||
@@ -218,7 +218,7 @@ internal class TestDataSeeder(
|
||||
},
|
||||
ProfileColors =
|
||||
new() { BannerTop = "#231F20", BannerBottom = "#231F20", Accent = "#272526", Menu = "#FFFFFF" },
|
||||
SocialNetworks = new()
|
||||
Socials = new()
|
||||
{
|
||||
FacebookUrl = "https://www.facebook.com/arps.company",
|
||||
InstagramUrl = "https://www.instagram.com/arps.co/",
|
||||
@@ -246,7 +246,7 @@ internal class TestDataSeeder(
|
||||
{
|
||||
BannerTop = "#231F20", BannerBottom = "#272526", Accent = "#231F20", Menu = "#231F20",
|
||||
},
|
||||
SocialNetworks =
|
||||
Socials =
|
||||
new()
|
||||
{
|
||||
FacebookUrl = "https://www.facebook.com/chloegestionmedias",
|
||||
@@ -272,7 +272,7 @@ internal class TestDataSeeder(
|
||||
{
|
||||
BannerTop = "#0BAAB2", BannerBottom = "#006D77", Accent = "#CC6F91", Menu = "#CC6F91",
|
||||
},
|
||||
SocialNetworks =
|
||||
Socials =
|
||||
new()
|
||||
{
|
||||
FacebookUrl = "https://www.facebook.com/GuillaumeMousseau222",
|
||||
@@ -300,7 +300,7 @@ internal class TestDataSeeder(
|
||||
{
|
||||
BannerTop = "#CC6F91", BannerBottom = "#FBC702", Accent = "#FBC702", Menu = "#FBC702",
|
||||
},
|
||||
SocialNetworks =
|
||||
Socials =
|
||||
new()
|
||||
{
|
||||
FacebookUrl = "https://www.facebook.com/Hutopy",
|
||||
@@ -327,7 +327,7 @@ internal class TestDataSeeder(
|
||||
{
|
||||
BannerTop = "#101B49", BannerBottom = "#698FE7", Accent = "#1D1D1B", Menu = "#1D1D1B",
|
||||
},
|
||||
SocialNetworks =
|
||||
Socials =
|
||||
new()
|
||||
{
|
||||
FacebookUrl = "https://www.facebook.com/MathieuCaronPro/",
|
||||
|
||||
Reference in New Issue
Block a user