Remove creator's about, adds title.

Remove extra content properties.
Change creator's colors to materials palette.
This commit is contained in:
2024-09-22 03:10:00 -04:00
parent cc8cdbe0d6
commit e482a0726f
21 changed files with 1656 additions and 153 deletions

View File

@@ -43,10 +43,6 @@ public class ContentDbContext(
.Entity<Subscription>()
.HasKey(s => new { s.CreatedBy, s.CreatorId });
modelBuilder
.Entity<Creator>()
.OwnsOne<About>(x => x.About);
modelBuilder
.Entity<Creator>()
.OwnsOne<Socials>(x => x.Socials)

View File

@@ -9,24 +9,24 @@ public class Creator
public DateTimeOffset CreatedAt { get; init; }
[MaxLength(255)] public string Name { get; set; } = null!;
public About About { get; set; } = new();
[MaxLength(255)] public string? Title { get; set; }
public Socials Socials { get; set; } = new();
public Colors Colors { get; set; } = new();
public Images Images { get; set; } = new();
}
public class About
{
[MaxLength(255)] public string? Title { get; set; }
[MaxLength(2048)] public string? Description { get; set; }
}
public class Colors
{
[MaxLength(9)] public string? BannerTop { get; set; }
[MaxLength(9)] public string? BannerBottom { get; set; }
[MaxLength(9)] public string? Accent { get; set; }
[MaxLength(9)] public string? Menu { get; set; }
[MaxLength(9)] public string Primary { get; set; } = null!;
[MaxLength(9)] public string Secondary { get; set; } = null!;
[MaxLength(9)] public string Background { get; set; } = null!;
[MaxLength(9)] public string Surface { get; set; } = null!;
[MaxLength(9)] public string Error { get; set; } = null!;
[MaxLength(9)] public string OnPrimary { get; set; } = null!;
[MaxLength(9)] public string OnSecondary { get; set; } = null!;
[MaxLength(9)] public string OnBackground { get; set; } = null!;
[MaxLength(9)] public string OnSurface { get; set; } = null!;
[MaxLength(9)] public string OnError { get; set; } = null!;
}
public class Socials

View File

@@ -5,10 +5,16 @@ namespace Hutopy.Web.Features.Contents.Handlers;
[PublicAPI]
public record ChangeColorsRequest(
Guid CreatorId,
string? BannerTop,
string? BannerBottom,
string? Accent,
string? Menu);
string Primary,
string Secondary,
string Background,
string Surface,
string Error,
string OnPrimary,
string OnSecondary,
string OnBackground,
string OnSurface,
string OnError);
[PublicAPI]
public sealed class ChangeColorsRequestValidator
@@ -16,29 +22,55 @@ public sealed class ChangeColorsRequestValidator
{
public ChangeColorsRequestValidator()
{
RuleFor(x => x.BannerTop)
RuleFor(x => x.Primary)
.MinimumLength(4).WithMessage("The minimum value should be in the format #444")
.MaximumLength(9).WithMessage("The maximum value should be in the format #11223344")
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #")
.When(x => x.BannerTop is not null);
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #");
RuleFor(x => x.BannerBottom)
RuleFor(x => x.Secondary)
.MinimumLength(4).WithMessage("The minimum value should be in the format #444")
.MaximumLength(9).WithMessage("The maximum value should be in the format #11223344")
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #")
.When(x => x.BannerBottom is not null);
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #");
RuleFor(x => x.Accent)
RuleFor(x => x.Background)
.MinimumLength(4).WithMessage("The minimum value should be in the format #444")
.MaximumLength(9).WithMessage("The maximum value should be in the format #11223344")
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #")
.When(x => x.Accent is not null);
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #");
RuleFor(x => x.Menu)
RuleFor(x => x.Surface)
.MinimumLength(4).WithMessage("The minimum value should be in the format #444")
.MaximumLength(9).WithMessage("The maximum value should be in the format #11223344")
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #")
.When(x => x.Menu is not null);
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #");
RuleFor(x => x.Error)
.MinimumLength(4).WithMessage("The minimum value should be in the format #444")
.MaximumLength(9).WithMessage("The maximum value should be in the format #11223344")
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #");
RuleFor(x => x.OnPrimary)
.MinimumLength(4).WithMessage("The minimum value should be in the format #444")
.MaximumLength(9).WithMessage("The maximum value should be in the format #11223344")
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #");
RuleFor(x => x.OnSecondary)
.MinimumLength(4).WithMessage("The minimum value should be in the format #444")
.MaximumLength(9).WithMessage("The maximum value should be in the format #11223344")
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #");
RuleFor(x => x.OnBackground)
.MinimumLength(4).WithMessage("The minimum value should be in the format #444")
.MaximumLength(9).WithMessage("The maximum value should be in the format #11223344")
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #");
RuleFor(x => x.OnSurface)
.MinimumLength(4).WithMessage("The minimum value should be in the format #444")
.MaximumLength(9).WithMessage("The maximum value should be in the format #11223344")
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #");
RuleFor(x => x.OnError)
.MinimumLength(4).WithMessage("The minimum value should be in the format #444")
.MaximumLength(9).WithMessage("The maximum value should be in the format #11223344")
.Must(x => x.StartsWith('#')).WithMessage("The format should be a valid html color and start with #");
}
}
@@ -63,10 +95,16 @@ public class ChangeColorsHandler(
c => c.Id == request.CreatorId,
cancellationToken: ct);
creator.Colors.BannerTop = request.BannerTop;
creator.Colors.BannerBottom = request.BannerBottom;
creator.Colors.Accent = request.Accent;
creator.Colors.Menu = request.Menu;
creator.Colors.Primary = request.Primary;
creator.Colors.Secondary = request.Secondary;
creator.Colors.Background = request.Background;
creator.Colors.Surface = request.Surface;
creator.Colors.Error = request.Error;
creator.Colors.OnPrimary = request.OnPrimary;
creator.Colors.OnSecondary = request.OnSecondary;
creator.Colors.OnBackground = request.OnBackground;
creator.Colors.OnSurface = request.OnSurface;
creator.Colors.OnError = request.OnError;
await context.SaveChangesAsync(ct);

View File

@@ -3,35 +3,32 @@
namespace Hutopy.Web.Features.Contents.Handlers;
[PublicAPI]
public record ChangeAboutRequest(
public record ChangeTitleRequest(
Guid CreatorId,
string? Title,
string? Description);
string? Title);
[PublicAPI]
public class ChangeAboutHandler(
public class ChangeTitleHandler(
ContentDbContext context)
: Endpoint<ChangeAboutRequest>
: Endpoint<ChangeTitleRequest>
{
public override void Configure()
{
Post("/api/creators/{CreatorId}/about");
Post("/api/creators/{CreatorId}/title");
Options(o => o.WithTags("Creators"));
}
public override async Task HandleAsync(
ChangeAboutRequest request,
ChangeTitleRequest request,
CancellationToken ct)
{
var creator = await context
.Creators
.Include(c => c.About)
.SingleAsync(
c => c.Id == request.CreatorId,
cancellationToken: ct);
creator.About.Title = request.Title;
creator.About.Description = request.Description;
creator.Title = request.Title;
await context.SaveChangesAsync(ct);

View File

@@ -117,8 +117,6 @@ public sealed class PostContent(
CreatedByName = c.Creator!.Name,
CreatedByPortraitUrl = c.Creator.Images.Logo,
CreatedAt = c.CreatedAt,
ColorMenu = c.Creator.Colors.Menu,
ColorAccent = c.Creator.Colors.Accent,
DeletedBy = c.DeletedBy,
DeletedAt = c.DeletedAt,
Title = c.Title,

View File

@@ -35,8 +35,6 @@ public class GetContent(
CreatedByName = c.Creator!.Name,
CreatedByPortraitUrl = c.Creator.Images.Logo,
CreatedAt = c.CreatedAt,
ColorMenu = c.Creator.Colors.Menu,
ColorAccent = c.Creator.Colors.Accent,
DeletedBy = c.DeletedBy,
DeletedAt = c.DeletedAt,
Title = c.Title,

View File

@@ -46,8 +46,6 @@ public class GetContentsByCreatorHandler(
CreatedByName = c.Creator!.Name,
CreatedByPortraitUrl = c.Creator.Images.Logo,
CreatedAt = c.CreatedAt,
ColorMenu = c.Creator.Colors.Menu,
ColorAccent = c.Creator.Colors.Accent,
DeletedBy = c.DeletedBy,
DeletedAt = c.DeletedAt,
Title = c.Title,

View File

@@ -59,7 +59,7 @@ public class GetCreatorByAliasHandler(
creator.CreatedBy,
creator.CreatedAt,
creator.Name,
creator.About,
creator.Title,
creator.Socials,
creator.Colors,
creator.Images,

View File

@@ -45,8 +45,6 @@ public class GetFeaturedContentsHandler(
CreatedByName = c.Creator!.Name,
CreatedByPortraitUrl = c.Creator.Images.Logo,
CreatedAt = c.CreatedAt,
ColorMenu = c.Creator.Colors.Menu,
ColorAccent = c.Creator.Colors.Accent,
DeletedBy = c.DeletedBy,
DeletedAt = c.DeletedAt,
Title = c.Title,

View File

@@ -55,8 +55,6 @@ public class GetFollowedContentsHandler(
CreatedByName = c.Creator!.Name,
CreatedByPortraitUrl = c.Creator.Images.Logo,
CreatedAt = c.CreatedAt,
ColorMenu = c.Creator.Colors.Menu,
ColorAccent = c.Creator.Colors.Accent,
DeletedBy = c.DeletedBy,
DeletedAt = c.DeletedAt,
Title = c.Title,

View File

@@ -7,8 +7,6 @@ public class ContentModel
public required Guid CreatedBy { get; init; }
public required string CreatedByName { get; init; }
public required string? CreatedByPortraitUrl { get; init; }
public required string? ColorMenu { get; init; }
public required string? ColorAccent { get; init; }
public required DateTimeOffset CreatedAt { get; init; }
public Guid? DeletedBy { get; init; }
public DateTimeOffset? DeletedAt { get; init; }

View File

@@ -8,7 +8,7 @@ public record struct CreatorModel(
Guid CreatedBy,
DateTimeOffset CreatedAt,
string Name,
About About,
string? Title,
Socials Socials,
Colors Colors,
Images Images,

View File

@@ -0,0 +1,320 @@
// <auto-generated />
using System;
using Hutopy.Web.Features.Contents.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Hutopy.Web.Features.Contents.Migrations
{
[DbContext(typeof(ContentDbContext))]
[Migration("20240919045548_UseMeterialColorSchema")]
partial class UseMeterialColorSchema
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasDefaultSchema("Content")
.HasAnnotation("ProductVersion", "8.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Content", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("CURRENT_TIMESTAMP");
b.Property<Guid>("CreatedBy")
.HasColumnType("uuid");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("timestamp with time zone");
b.Property<Guid?>("DeletedBy")
.HasColumnType("uuid");
b.Property<string>("Description")
.IsRequired()
.HasMaxLength(2048)
.HasColumnType("character varying(2048)");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string[]>("Urls")
.HasColumnType("text[]");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.ToTable("Contents", "Content");
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Creator", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<Guid>("CreatedBy")
.HasColumnType("uuid");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.HasKey("Id");
b.ToTable("Creators", "Content");
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Subscription", b =>
{
b.Property<Guid>("CreatedBy")
.HasColumnType("uuid");
b.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("CreatedBy", "CreatorId");
b.HasIndex("CreatorId");
b.ToTable("Subscriptions", "Content");
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Content", b =>
{
b.HasOne("Hutopy.Web.Features.Contents.Data.Creator", "Creator")
.WithMany()
.HasForeignKey("CreatedBy")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsMany("Hutopy.Web.Features.Contents.Data.ContentReaction", "Reactions", b1 =>
{
b1.Property<Guid>("ContentId")
.HasColumnType("uuid");
b1.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b1.Property<int>("Id"));
b1.Property<int>("Reaction")
.HasColumnType("integer");
b1.Property<Guid>("UserId")
.HasColumnType("uuid");
b1.Property<string>("UserName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b1.HasKey("ContentId", "Id");
b1.ToTable("ContentReactions", "Content");
b1.WithOwner()
.HasForeignKey("ContentId");
});
b.Navigation("Creator");
b.Navigation("Reactions");
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Creator", b =>
{
b.OwnsOne("Hutopy.Web.Features.Contents.Data.About", "About", b1 =>
{
b1.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b1.Property<string>("Description")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)");
b1.Property<string>("Title")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.HasKey("CreatorId");
b1.ToTable("Creators", "Content");
b1.WithOwner()
.HasForeignKey("CreatorId");
});
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Colors", "Colors", b1 =>
{
b1.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b1.Property<string>("Background")
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("Error")
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnBackground")
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnError")
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnPrimary")
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnSecondary")
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnSurface")
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("Primary")
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("Secondary")
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("Surface")
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.HasKey("CreatorId");
b1.ToTable("Colors", "Content");
b1.WithOwner()
.HasForeignKey("CreatorId");
});
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Images", "Images", b1 =>
{
b1.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b1.Property<string>("Banner")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("Logo")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.HasKey("CreatorId");
b1.ToTable("Images", "Content");
b1.WithOwner()
.HasForeignKey("CreatorId");
});
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Socials", "Socials", b1 =>
{
b1.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b1.Property<string>("FacebookUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("InstagramUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("LinkedInUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("RedditUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("TikTokUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("WebsiteUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("XUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("YoutubeUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.HasKey("CreatorId");
b1.ToTable("Socials", "Content");
b1.WithOwner()
.HasForeignKey("CreatorId");
});
b.Navigation("About")
.IsRequired();
b.Navigation("Colors")
.IsRequired();
b.Navigation("Images")
.IsRequired();
b.Navigation("Socials")
.IsRequired();
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Subscription", b =>
{
b.HasOne("Hutopy.Web.Features.Contents.Data.Creator", "Creator")
.WithMany()
.HasForeignKey("CreatorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Creator");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,144 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Hutopy.Web.Features.Contents.Migrations
{
/// <inheritdoc />
public partial class UseMeterialColorSchema : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Menu",
schema: "Content",
table: "Colors",
newName: "Surface");
migrationBuilder.RenameColumn(
name: "BannerTop",
schema: "Content",
table: "Colors",
newName: "Secondary");
migrationBuilder.RenameColumn(
name: "BannerBottom",
schema: "Content",
table: "Colors",
newName: "Primary");
migrationBuilder.RenameColumn(
name: "Accent",
schema: "Content",
table: "Colors",
newName: "OnSurface");
migrationBuilder.AddColumn<string>(
name: "Background",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Error",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "OnBackground",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "OnError",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "OnPrimary",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "OnSecondary",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Background",
schema: "Content",
table: "Colors");
migrationBuilder.DropColumn(
name: "Error",
schema: "Content",
table: "Colors");
migrationBuilder.DropColumn(
name: "OnBackground",
schema: "Content",
table: "Colors");
migrationBuilder.DropColumn(
name: "OnError",
schema: "Content",
table: "Colors");
migrationBuilder.DropColumn(
name: "OnPrimary",
schema: "Content",
table: "Colors");
migrationBuilder.DropColumn(
name: "OnSecondary",
schema: "Content",
table: "Colors");
migrationBuilder.RenameColumn(
name: "Surface",
schema: "Content",
table: "Colors",
newName: "Menu");
migrationBuilder.RenameColumn(
name: "Secondary",
schema: "Content",
table: "Colors",
newName: "BannerTop");
migrationBuilder.RenameColumn(
name: "Primary",
schema: "Content",
table: "Colors",
newName: "BannerBottom");
migrationBuilder.RenameColumn(
name: "OnSurface",
schema: "Content",
table: "Colors",
newName: "Accent");
}
}
}

View File

@@ -0,0 +1,330 @@
// <auto-generated />
using System;
using Hutopy.Web.Features.Contents.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Hutopy.Web.Features.Contents.Migrations
{
[DbContext(typeof(ContentDbContext))]
[Migration("20240919051151_NoMoreOptionalColors")]
partial class NoMoreOptionalColors
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasDefaultSchema("Content")
.HasAnnotation("ProductVersion", "8.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Content", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("CURRENT_TIMESTAMP");
b.Property<Guid>("CreatedBy")
.HasColumnType("uuid");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("timestamp with time zone");
b.Property<Guid?>("DeletedBy")
.HasColumnType("uuid");
b.Property<string>("Description")
.IsRequired()
.HasMaxLength(2048)
.HasColumnType("character varying(2048)");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string[]>("Urls")
.HasColumnType("text[]");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.ToTable("Contents", "Content");
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Creator", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<Guid>("CreatedBy")
.HasColumnType("uuid");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.HasKey("Id");
b.ToTable("Creators", "Content");
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Subscription", b =>
{
b.Property<Guid>("CreatedBy")
.HasColumnType("uuid");
b.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("CreatedBy", "CreatorId");
b.HasIndex("CreatorId");
b.ToTable("Subscriptions", "Content");
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Content", b =>
{
b.HasOne("Hutopy.Web.Features.Contents.Data.Creator", "Creator")
.WithMany()
.HasForeignKey("CreatedBy")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsMany("Hutopy.Web.Features.Contents.Data.ContentReaction", "Reactions", b1 =>
{
b1.Property<Guid>("ContentId")
.HasColumnType("uuid");
b1.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b1.Property<int>("Id"));
b1.Property<int>("Reaction")
.HasColumnType("integer");
b1.Property<Guid>("UserId")
.HasColumnType("uuid");
b1.Property<string>("UserName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b1.HasKey("ContentId", "Id");
b1.ToTable("ContentReactions", "Content");
b1.WithOwner()
.HasForeignKey("ContentId");
});
b.Navigation("Creator");
b.Navigation("Reactions");
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Creator", b =>
{
b.OwnsOne("Hutopy.Web.Features.Contents.Data.About", "About", b1 =>
{
b1.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b1.Property<string>("Description")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)");
b1.Property<string>("Title")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.HasKey("CreatorId");
b1.ToTable("Creators", "Content");
b1.WithOwner()
.HasForeignKey("CreatorId");
});
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Colors", "Colors", b1 =>
{
b1.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b1.Property<string>("Background")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("Error")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnBackground")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnError")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnPrimary")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnSecondary")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnSurface")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("Primary")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("Secondary")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("Surface")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.HasKey("CreatorId");
b1.ToTable("Colors", "Content");
b1.WithOwner()
.HasForeignKey("CreatorId");
});
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Images", "Images", b1 =>
{
b1.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b1.Property<string>("Banner")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("Logo")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.HasKey("CreatorId");
b1.ToTable("Images", "Content");
b1.WithOwner()
.HasForeignKey("CreatorId");
});
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Socials", "Socials", b1 =>
{
b1.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b1.Property<string>("FacebookUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("InstagramUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("LinkedInUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("RedditUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("TikTokUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("WebsiteUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("XUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("YoutubeUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.HasKey("CreatorId");
b1.ToTable("Socials", "Content");
b1.WithOwner()
.HasForeignKey("CreatorId");
});
b.Navigation("About")
.IsRequired();
b.Navigation("Colors")
.IsRequired();
b.Navigation("Images")
.IsRequired();
b.Navigation("Socials")
.IsRequired();
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Subscription", b =>
{
b.HasOne("Hutopy.Web.Features.Contents.Data.Creator", "Creator")
.WithMany()
.HasForeignKey("CreatorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Creator");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,258 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Hutopy.Web.Features.Contents.Migrations
{
/// <inheritdoc />
public partial class NoMoreOptionalColors : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Surface",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Secondary",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Primary",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "OnSurface",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "OnSecondary",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "OnPrimary",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "OnError",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "OnBackground",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Error",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Background",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9,
oldNullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Surface",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9);
migrationBuilder.AlterColumn<string>(
name: "Secondary",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9);
migrationBuilder.AlterColumn<string>(
name: "Primary",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9);
migrationBuilder.AlterColumn<string>(
name: "OnSurface",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9);
migrationBuilder.AlterColumn<string>(
name: "OnSecondary",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9);
migrationBuilder.AlterColumn<string>(
name: "OnPrimary",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9);
migrationBuilder.AlterColumn<string>(
name: "OnError",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9);
migrationBuilder.AlterColumn<string>(
name: "OnBackground",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9);
migrationBuilder.AlterColumn<string>(
name: "Error",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9);
migrationBuilder.AlterColumn<string>(
name: "Background",
schema: "Content",
table: "Colors",
type: "character varying(9)",
maxLength: 9,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(9)",
oldMaxLength: 9);
}
}
}

View File

@@ -0,0 +1,310 @@
// <auto-generated />
using System;
using Hutopy.Web.Features.Contents.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Hutopy.Web.Features.Contents.Migrations
{
[DbContext(typeof(ContentDbContext))]
[Migration("20240922064815_RemovesAboutAddsTitle")]
partial class RemovesAboutAddsTitle
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasDefaultSchema("Content")
.HasAnnotation("ProductVersion", "8.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Content", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("CURRENT_TIMESTAMP");
b.Property<Guid>("CreatedBy")
.HasColumnType("uuid");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("timestamp with time zone");
b.Property<Guid?>("DeletedBy")
.HasColumnType("uuid");
b.Property<string>("Description")
.IsRequired()
.HasMaxLength(2048)
.HasColumnType("character varying(2048)");
b.Property<string>("Title")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string[]>("Urls")
.HasColumnType("text[]");
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.ToTable("Contents", "Content");
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Creator", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<Guid>("CreatedBy")
.HasColumnType("uuid");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<string>("Title")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.HasKey("Id");
b.ToTable("Creators", "Content");
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Subscription", b =>
{
b.Property<Guid>("CreatedBy")
.HasColumnType("uuid");
b.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("CreatedBy", "CreatorId");
b.HasIndex("CreatorId");
b.ToTable("Subscriptions", "Content");
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Content", b =>
{
b.HasOne("Hutopy.Web.Features.Contents.Data.Creator", "Creator")
.WithMany()
.HasForeignKey("CreatedBy")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.OwnsMany("Hutopy.Web.Features.Contents.Data.ContentReaction", "Reactions", b1 =>
{
b1.Property<Guid>("ContentId")
.HasColumnType("uuid");
b1.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b1.Property<int>("Id"));
b1.Property<int>("Reaction")
.HasColumnType("integer");
b1.Property<Guid>("UserId")
.HasColumnType("uuid");
b1.Property<string>("UserName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b1.HasKey("ContentId", "Id");
b1.ToTable("ContentReactions", "Content");
b1.WithOwner()
.HasForeignKey("ContentId");
});
b.Navigation("Creator");
b.Navigation("Reactions");
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Creator", b =>
{
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Colors", "Colors", b1 =>
{
b1.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b1.Property<string>("Background")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("Error")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnBackground")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnError")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnPrimary")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnSecondary")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnSurface")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("Primary")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("Secondary")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("Surface")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.HasKey("CreatorId");
b1.ToTable("Colors", "Content");
b1.WithOwner()
.HasForeignKey("CreatorId");
});
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Images", "Images", b1 =>
{
b1.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b1.Property<string>("Banner")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("Logo")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.HasKey("CreatorId");
b1.ToTable("Images", "Content");
b1.WithOwner()
.HasForeignKey("CreatorId");
});
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Socials", "Socials", b1 =>
{
b1.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b1.Property<string>("FacebookUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("InstagramUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("LinkedInUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("RedditUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("TikTokUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("WebsiteUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("XUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.Property<string>("YoutubeUrl")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.HasKey("CreatorId");
b1.ToTable("Socials", "Content");
b1.WithOwner()
.HasForeignKey("CreatorId");
});
b.Navigation("Colors")
.IsRequired();
b.Navigation("Images")
.IsRequired();
b.Navigation("Socials")
.IsRequired();
});
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Subscription", b =>
{
b.HasOne("Hutopy.Web.Features.Contents.Data.Creator", "Creator")
.WithMany()
.HasForeignKey("CreatorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Creator");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,43 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Hutopy.Web.Features.Contents.Migrations
{
/// <inheritdoc />
public partial class RemovesAboutAddsTitle : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "About_Description",
schema: "Content",
table: "Creators");
migrationBuilder.RenameColumn(
name: "About_Title",
schema: "Content",
table: "Creators",
newName: "Title");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Title",
schema: "Content",
table: "Creators",
newName: "About_Title");
migrationBuilder.AddColumn<string>(
name: "About_Description",
schema: "Content",
table: "Creators",
type: "character varying(2048)",
maxLength: 2048,
nullable: true);
}
}
}

View File

@@ -80,6 +80,10 @@ namespace Hutopy.Web.Features.Contents.Migrations
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<string>("Title")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.HasKey("Id");
b.ToTable("Creators", "Content");
@@ -148,45 +152,58 @@ namespace Hutopy.Web.Features.Contents.Migrations
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Creator", b =>
{
b.OwnsOne("Hutopy.Web.Features.Contents.Data.About", "About", b1 =>
{
b1.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b1.Property<string>("Description")
.HasMaxLength(2048)
.HasColumnType("character varying(2048)");
b1.Property<string>("Title")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b1.HasKey("CreatorId");
b1.ToTable("Creators", "Content");
b1.WithOwner()
.HasForeignKey("CreatorId");
});
b.OwnsOne("Hutopy.Web.Features.Contents.Data.Colors", "Colors", b1 =>
{
b1.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b1.Property<string>("Accent")
b1.Property<string>("Background")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("BannerBottom")
b1.Property<string>("Error")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("BannerTop")
b1.Property<string>("OnBackground")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("Menu")
b1.Property<string>("OnError")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnPrimary")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnSecondary")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("OnSurface")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("Primary")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("Secondary")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
b1.Property<string>("Surface")
.IsRequired()
.HasMaxLength(9)
.HasColumnType("character varying(9)");
@@ -264,9 +281,6 @@ namespace Hutopy.Web.Features.Contents.Migrations
.HasForeignKey("CreatorId");
});
b.Navigation("About")
.IsRequired();
b.Navigation("Colors")
.IsRequired();