// using System; using Knot.Modules.Relations.Infrastructure.Persistence; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace Knot.Modules.Relations.Migrations { [DbContext(typeof(RelationsDbContext))] [Migration("20260401112051_AddFriendships")] partial class AddFriendships { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasDefaultSchema("relations") .HasAnnotation("ProductVersion", "10.0.4") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Knot.Modules.Relations.Domain.Contact", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ContactId") .HasColumnType("uuid"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("Status") .IsRequired() .HasColumnType("text"); b.Property("UserId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("UserId", "ContactId") .IsUnique(); b.ToTable("Contacts", "relations"); }); modelBuilder.Entity("Knot.Modules.Relations.Domain.Friendship", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("FriendId") .HasColumnType("uuid"); b.Property("Status") .IsRequired() .HasColumnType("text"); b.Property("UserId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("UserId", "FriendId") .IsUnique(); b.ToTable("Friendships", "relations"); }); modelBuilder.Entity("Knot.Modules.Relations.Domain.UserReplica", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Avatar") .IsRequired() .HasColumnType("text"); b.Property("DisplayName") .IsRequired() .HasColumnType("text"); b.Property("Domain") .HasColumnType("text"); b.Property("IsExternal") .HasColumnType("boolean"); b.Property("Username") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("UserReplicas", "relations"); }); #pragma warning restore 612, 618 } } }