diff --git a/backend/src/Socialize.Api/Infrastructure/Development/DevelopmentSeedExtensions.cs b/backend/src/Socialize.Api/Infrastructure/Development/DevelopmentSeedExtensions.cs index 5d690f1..1e9d3f3 100644 --- a/backend/src/Socialize.Api/Infrastructure/Development/DevelopmentSeedExtensions.cs +++ b/backend/src/Socialize.Api/Infrastructure/Development/DevelopmentSeedExtensions.cs @@ -317,7 +317,6 @@ public static class DevelopmentSeedExtensions { Id = WorkspaceId, Name = string.Empty, - Slug = string.Empty, TimeZone = string.Empty, CreatedAt = DateTimeOffset.UtcNow, }; @@ -325,7 +324,6 @@ public static class DevelopmentSeedExtensions } workspace.Name = "Northstar Studio"; - workspace.Slug = "northstar-studio"; workspace.OrganizationId = OrganizationId; workspace.OwnerUserId = managerUserId; workspace.TimeZone = "America/Montreal"; diff --git a/backend/src/Socialize.Api/Migrations/20260423061407_Initial.Designer.cs b/backend/src/Socialize.Api/Migrations/20260423061407_Initial.Designer.cs deleted file mode 100644 index d4809c6..0000000 --- a/backend/src/Socialize.Api/Migrations/20260423061407_Initial.Designer.cs +++ /dev/null @@ -1,942 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Socialize.Api.Data; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - [DbContext(typeof(AppDbContext))] - [Migration("20260423061407_Initial")] - partial class Initial - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "10.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("ProviderKey") - .HasColumnType("text"); - - b.Property("ProviderDisplayName") - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("Value") - .HasColumnType("text"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("Socialize.Modules.Approvals.Data.ApprovalDecision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ApprovalRequestId") - .HasColumnType("uuid"); - - b.Property("Comment") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DecidedByEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DecidedByName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DecidedByUserId") - .HasColumnType("uuid"); - - b.Property("Decision") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("ApprovalRequestId"); - - b.ToTable("ApprovalDecisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Modules.Approvals.Data.ApprovalRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessToken") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("CompletedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("DueAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RequestedByUserId") - .HasColumnType("uuid"); - - b.Property("ReviewerEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReviewerName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("SentAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Stage") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("State") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ReviewerEmail"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("ApprovalRequests", (string)null); - }); - - modelBuilder.Entity("Socialize.Modules.Assets.Data.Asset", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AssetType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CurrentRevisionNumber") - .HasColumnType("integer"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleDriveFileId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleDriveLink") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("PreviewUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("SourceType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("Assets", (string)null); - }); - - modelBuilder.Entity("Socialize.Modules.Assets.Data.AssetRevision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AssetId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CreatedByUserId") - .HasColumnType("uuid"); - - b.Property("Notes") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PreviewUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("RevisionNumber") - .HasColumnType("integer"); - - b.Property("SourceReference") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.HasKey("Id"); - - b.HasIndex("AssetId"); - - b.HasIndex("AssetId", "RevisionNumber") - .IsUnique(); - - b.ToTable("AssetRevisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Modules.Clients.Data.Client", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("PrimaryContactEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PrimaryContactName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PrimaryContactPortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "Name") - .IsUnique(); - - b.ToTable("Clients", (string)null); - }); - - modelBuilder.Entity("Socialize.Modules.Comments.Data.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuthorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorUserId") - .HasColumnType("uuid"); - - b.Property("Body") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("IsResolved") - .HasColumnType("boolean"); - - b.Property("ParentCommentId") - .HasColumnType("uuid"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ParentCommentId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("Comments", (string)null); - }); - - modelBuilder.Entity("Socialize.Modules.ContentItems.Data.ContentItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CurrentRevisionLabel") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("CurrentRevisionNumber") - .HasColumnType("integer"); - - b.Property("DueDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Hashtags") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("ProjectId") - .HasColumnType("uuid"); - - b.Property("PublicationMessage") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("PublicationTargets") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("ProjectId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("ContentItems", (string)null); - }); - - modelBuilder.Entity("Socialize.Modules.ContentItems.Data.ContentItemRevision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ChangeSummary") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CreatedByUserId") - .HasColumnType("uuid"); - - b.Property("Hashtags") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PublicationMessage") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("PublicationTargets") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("RevisionLabel") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("RevisionNumber") - .HasColumnType("integer"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ContentItemId", "RevisionNumber") - .IsUnique(); - - b.ToTable("ContentItemRevisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Modules.Identity.Data.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("Socialize.Modules.Identity.Data.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessFailedCount") - .HasColumnType("integer"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Alias") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("BirthDate") - .HasColumnType("timestamp with time zone"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("boolean"); - - b.Property("FacebookId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Firstname") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Lastname") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("LockoutEnabled") - .HasColumnType("boolean"); - - b.Property("LockoutEnd") - .HasColumnType("timestamp with time zone"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PasswordHash") - .HasColumnType("text"); - - b.Property("PhoneNumber") - .HasColumnType("text"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("boolean"); - - b.Property("PortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("RefreshToken") - .HasMaxLength(44) - .HasColumnType("character varying(44)"); - - b.Property("RefreshTokenExpiryTime") - .HasColumnType("timestamp with time zone"); - - b.Property("SecurityStamp") - .HasColumnType("text"); - - b.Property("TwoFactorEnabled") - .HasColumnType("boolean"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("Socialize.Modules.Notifications.Data.NotificationEvent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("EntityId") - .HasColumnType("uuid"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("EventType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("Message") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("MetadataJson") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("ReadAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RecipientEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("RecipientUserId") - .HasColumnType("uuid"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("RecipientUserId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("NotificationEvents", (string)null); - }); - - modelBuilder.Entity("Socialize.Modules.Projects.Data.Project", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("EndDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Notes") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("StartDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("ClientId", "Name") - .IsUnique(); - - b.ToTable("Projects", (string)null); - }); - - modelBuilder.Entity("Socialize.Modules.Workspaces.Data.Workspace", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("OwnerUserId") - .HasColumnType("uuid"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("TimeZone") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.HasKey("Id"); - - b.HasIndex("OwnerUserId"); - - b.HasIndex("Slug") - .IsUnique(); - - b.ToTable("Workspaces", (string)null); - }); - - modelBuilder.Entity("Socialize.Modules.Workspaces.Data.WorkspaceInvite", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("InvitedByUserId") - .HasColumnType("uuid"); - - b.Property("Role") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "Email", "Status"); - - b.ToTable("WorkspaceInvites", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Socialize.Modules.Identity.Data.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("Socialize.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("Socialize.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Socialize.Modules.Identity.Data.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Socialize.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("Socialize.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260430054500_AddWorkspaceLogo.cs b/backend/src/Socialize.Api/Migrations/20260430054500_AddWorkspaceLogo.cs deleted file mode 100644 index 944d1af..0000000 --- a/backend/src/Socialize.Api/Migrations/20260430054500_AddWorkspaceLogo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Socialize.Api.Data; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - /// - [DbContext(typeof(AppDbContext))] - [Migration("20260430054500_AddWorkspaceLogo")] - public partial class AddWorkspaceLogo : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "LogoUrl", - table: "Workspaces", - type: "character varying(2048)", - maxLength: 2048, - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "LogoUrl", - table: "Workspaces"); - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260430072517_AddFeedbackFoundation.Designer.cs b/backend/src/Socialize.Api/Migrations/20260430072517_AddFeedbackFoundation.Designer.cs deleted file mode 100644 index 9681c4b..0000000 --- a/backend/src/Socialize.Api/Migrations/20260430072517_AddFeedbackFoundation.Designer.cs +++ /dev/null @@ -1,1105 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Socialize.Api.Data; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - [DbContext(typeof(AppDbContext))] - [Migration("20260430072517_AddFeedbackFoundation")] - partial class AddFeedbackFoundation - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "10.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("ProviderKey") - .HasColumnType("text"); - - b.Property("ProviderDisplayName") - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("Value") - .HasColumnType("text"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.ApprovalDecision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ApprovalRequestId") - .HasColumnType("uuid"); - - b.Property("Comment") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DecidedByEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DecidedByName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DecidedByUserId") - .HasColumnType("uuid"); - - b.Property("Decision") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("ApprovalRequestId"); - - b.ToTable("ApprovalDecisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.ApprovalRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessToken") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("CompletedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("DueAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RequestedByUserId") - .HasColumnType("uuid"); - - b.Property("ReviewerEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReviewerName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("SentAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Stage") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("State") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ReviewerEmail"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("ApprovalRequests", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Assets.Data.Asset", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AssetType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CurrentRevisionNumber") - .HasColumnType("integer"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleDriveFileId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleDriveLink") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("PreviewUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("SourceType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("Assets", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Assets.Data.AssetRevision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AssetId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CreatedByUserId") - .HasColumnType("uuid"); - - b.Property("Notes") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PreviewUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("RevisionNumber") - .HasColumnType("integer"); - - b.Property("SourceReference") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.HasKey("Id"); - - b.HasIndex("AssetId"); - - b.HasIndex("AssetId", "RevisionNumber") - .IsUnique(); - - b.ToTable("AssetRevisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Clients.Data.Client", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("PrimaryContactEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PrimaryContactName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PrimaryContactPortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "Name") - .IsUnique(); - - b.ToTable("Clients", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Comments.Data.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuthorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorUserId") - .HasColumnType("uuid"); - - b.Property("Body") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("IsResolved") - .HasColumnType("boolean"); - - b.Property("ParentCommentId") - .HasColumnType("uuid"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ParentCommentId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("Comments", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.ContentItems.Data.ContentItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CurrentRevisionLabel") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("CurrentRevisionNumber") - .HasColumnType("integer"); - - b.Property("DueDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Hashtags") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("ProjectId") - .HasColumnType("uuid"); - - b.Property("PublicationMessage") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("PublicationTargets") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("ProjectId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("ContentItems", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.ContentItems.Data.ContentItemRevision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ChangeSummary") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CreatedByUserId") - .HasColumnType("uuid"); - - b.Property("Hashtags") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PublicationMessage") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("PublicationTargets") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("RevisionLabel") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("RevisionNumber") - .HasColumnType("integer"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ContentItemId", "RevisionNumber") - .IsUnique(); - - b.ToTable("ContentItemRevisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AppVersion") - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("BrowserUserAgent") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("CancellationReason") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("CancelledAt") - .HasColumnType("timestamp with time zone"); - - b.Property("CancelledByUserId") - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("ClientName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("ContentItemTitle") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(8000) - .HasColumnType("character varying(8000)"); - - b.Property("LastActivityAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ProjectId") - .HasColumnType("uuid"); - - b.Property("ProjectName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterUserId") - .HasColumnType("uuid"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("SubmittedPath") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("ViewportHeight") - .HasColumnType("integer"); - - b.Property("ViewportWidth") - .HasColumnType("integer"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.Property("WorkspaceName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("LastActivityAt"); - - b.HasIndex("ReporterUserId"); - - b.HasIndex("Status"); - - b.HasIndex("Type"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("FeedbackReports", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.HasIndex("FeedbackReportId", "NormalizedName") - .IsUnique(); - - b.ToTable("FeedbackTags", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Identity.Data.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Identity.Data.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessFailedCount") - .HasColumnType("integer"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Alias") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("BirthDate") - .HasColumnType("timestamp with time zone"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("boolean"); - - b.Property("FacebookId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Firstname") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Lastname") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("LockoutEnabled") - .HasColumnType("boolean"); - - b.Property("LockoutEnd") - .HasColumnType("timestamp with time zone"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PasswordHash") - .HasColumnType("text"); - - b.Property("PhoneNumber") - .HasColumnType("text"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("boolean"); - - b.Property("PortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("RefreshToken") - .HasMaxLength(44) - .HasColumnType("character varying(44)"); - - b.Property("RefreshTokenExpiryTime") - .HasColumnType("timestamp with time zone"); - - b.Property("SecurityStamp") - .HasColumnType("text"); - - b.Property("TwoFactorEnabled") - .HasColumnType("boolean"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Notifications.Data.NotificationEvent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("EntityId") - .HasColumnType("uuid"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("EventType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("Message") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("MetadataJson") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("ReadAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RecipientEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("RecipientUserId") - .HasColumnType("uuid"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("RecipientUserId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("NotificationEvents", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Projects.Data.Project", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("EndDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Notes") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("StartDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("ClientId", "Name") - .IsUnique(); - - b.ToTable("Projects", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Workspaces.Data.Workspace", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("LogoUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("OwnerUserId") - .HasColumnType("uuid"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("TimeZone") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.HasKey("Id"); - - b.HasIndex("OwnerUserId"); - - b.HasIndex("Slug") - .IsUnique(); - - b.ToTable("Workspaces", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Workspaces.Data.WorkspaceInvite", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("InvitedByUserId") - .HasColumnType("uuid"); - - b.Property("Role") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "Email", "Status"); - - b.ToTable("WorkspaceInvites", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackTag", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("Tags") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackReport", b => - { - b.Navigation("Tags"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260430072517_AddFeedbackFoundation.cs b/backend/src/Socialize.Api/Migrations/20260430072517_AddFeedbackFoundation.cs deleted file mode 100644 index b98397c..0000000 --- a/backend/src/Socialize.Api/Migrations/20260430072517_AddFeedbackFoundation.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - /// - public partial class AddFeedbackFoundation : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "FeedbackReports", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - Type = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), - Status = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), - Description = table.Column(type: "character varying(8000)", maxLength: 8000, nullable: false), - ReporterUserId = table.Column(type: "uuid", nullable: false), - ReporterDisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - ReporterEmail = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - SubmittedPath = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: false), - BrowserUserAgent = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), - ViewportWidth = table.Column(type: "integer", nullable: true), - ViewportHeight = table.Column(type: "integer", nullable: true), - AppVersion = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), - WorkspaceId = table.Column(type: "uuid", nullable: true), - WorkspaceName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), - ClientId = table.Column(type: "uuid", nullable: true), - ClientName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), - ProjectId = table.Column(type: "uuid", nullable: true), - ProjectName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), - ContentItemId = table.Column(type: "uuid", nullable: true), - ContentItemTitle = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), - CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - LastActivityAt = table.Column(type: "timestamp with time zone", nullable: false), - CancelledAt = table.Column(type: "timestamp with time zone", nullable: true), - CancelledByUserId = table.Column(type: "uuid", nullable: true), - CancellationReason = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_FeedbackReports", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "FeedbackTags", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - FeedbackReportId = table.Column(type: "uuid", nullable: false), - Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), - NormalizedName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_FeedbackTags", x => x.Id); - table.ForeignKey( - name: "FK_FeedbackTags_FeedbackReports_FeedbackReportId", - column: x => x.FeedbackReportId, - principalTable: "FeedbackReports", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_FeedbackReports_LastActivityAt", - table: "FeedbackReports", - column: "LastActivityAt"); - - migrationBuilder.CreateIndex( - name: "IX_FeedbackReports_ReporterUserId", - table: "FeedbackReports", - column: "ReporterUserId"); - - migrationBuilder.CreateIndex( - name: "IX_FeedbackReports_Status", - table: "FeedbackReports", - column: "Status"); - - migrationBuilder.CreateIndex( - name: "IX_FeedbackReports_Type", - table: "FeedbackReports", - column: "Type"); - - migrationBuilder.CreateIndex( - name: "IX_FeedbackReports_WorkspaceId", - table: "FeedbackReports", - column: "WorkspaceId"); - - migrationBuilder.CreateIndex( - name: "IX_FeedbackTags_FeedbackReportId_NormalizedName", - table: "FeedbackTags", - columns: new[] { "FeedbackReportId", "NormalizedName" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_FeedbackTags_NormalizedName", - table: "FeedbackTags", - column: "NormalizedName"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "FeedbackTags"); - - migrationBuilder.DropTable( - name: "FeedbackReports"); - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260430171123_AddFeedbackScreenshots.Designer.cs b/backend/src/Socialize.Api/Migrations/20260430171123_AddFeedbackScreenshots.Designer.cs deleted file mode 100644 index d0c53b8..0000000 --- a/backend/src/Socialize.Api/Migrations/20260430171123_AddFeedbackScreenshots.Designer.cs +++ /dev/null @@ -1,1163 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Socialize.Api.Data; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - [DbContext(typeof(AppDbContext))] - [Migration("20260430171123_AddFeedbackScreenshots")] - partial class AddFeedbackScreenshots - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "10.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("ProviderKey") - .HasColumnType("text"); - - b.Property("ProviderDisplayName") - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("Value") - .HasColumnType("text"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.ApprovalDecision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ApprovalRequestId") - .HasColumnType("uuid"); - - b.Property("Comment") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DecidedByEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DecidedByName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DecidedByUserId") - .HasColumnType("uuid"); - - b.Property("Decision") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("ApprovalRequestId"); - - b.ToTable("ApprovalDecisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.ApprovalRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessToken") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("CompletedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("DueAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RequestedByUserId") - .HasColumnType("uuid"); - - b.Property("ReviewerEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReviewerName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("SentAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Stage") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("State") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ReviewerEmail"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("ApprovalRequests", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Assets.Data.Asset", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AssetType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CurrentRevisionNumber") - .HasColumnType("integer"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleDriveFileId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleDriveLink") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("PreviewUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("SourceType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("Assets", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Assets.Data.AssetRevision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AssetId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CreatedByUserId") - .HasColumnType("uuid"); - - b.Property("Notes") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PreviewUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("RevisionNumber") - .HasColumnType("integer"); - - b.Property("SourceReference") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.HasKey("Id"); - - b.HasIndex("AssetId"); - - b.HasIndex("AssetId", "RevisionNumber") - .IsUnique(); - - b.ToTable("AssetRevisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Clients.Data.Client", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("PrimaryContactEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PrimaryContactName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PrimaryContactPortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "Name") - .IsUnique(); - - b.ToTable("Clients", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Comments.Data.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuthorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorUserId") - .HasColumnType("uuid"); - - b.Property("Body") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("IsResolved") - .HasColumnType("boolean"); - - b.Property("ParentCommentId") - .HasColumnType("uuid"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ParentCommentId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("Comments", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.ContentItems.Data.ContentItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CurrentRevisionLabel") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("CurrentRevisionNumber") - .HasColumnType("integer"); - - b.Property("DueDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Hashtags") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("ProjectId") - .HasColumnType("uuid"); - - b.Property("PublicationMessage") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("PublicationTargets") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("ProjectId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("ContentItems", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.ContentItems.Data.ContentItemRevision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ChangeSummary") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CreatedByUserId") - .HasColumnType("uuid"); - - b.Property("Hashtags") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PublicationMessage") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("PublicationTargets") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("RevisionLabel") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("RevisionNumber") - .HasColumnType("integer"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ContentItemId", "RevisionNumber") - .IsUnique(); - - b.ToTable("ContentItemRevisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AppVersion") - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("BrowserUserAgent") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("CancellationReason") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("CancelledAt") - .HasColumnType("timestamp with time zone"); - - b.Property("CancelledByUserId") - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("ClientName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("ContentItemTitle") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(8000) - .HasColumnType("character varying(8000)"); - - b.Property("LastActivityAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ProjectId") - .HasColumnType("uuid"); - - b.Property("ProjectName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterUserId") - .HasColumnType("uuid"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("SubmittedPath") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("ViewportHeight") - .HasColumnType("integer"); - - b.Property("ViewportWidth") - .HasColumnType("integer"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.Property("WorkspaceName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("LastActivityAt"); - - b.HasIndex("ReporterUserId"); - - b.HasIndex("Status"); - - b.HasIndex("Type"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("FeedbackReports", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("BlobContainerName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("BlobName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("ContentType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("SizeBytes") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("FeedbackReportId") - .IsUnique(); - - b.ToTable("FeedbackScreenshots", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.HasIndex("FeedbackReportId", "NormalizedName") - .IsUnique(); - - b.ToTable("FeedbackTags", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Identity.Data.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Identity.Data.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessFailedCount") - .HasColumnType("integer"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Alias") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("BirthDate") - .HasColumnType("timestamp with time zone"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("boolean"); - - b.Property("FacebookId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Firstname") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Lastname") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("LockoutEnabled") - .HasColumnType("boolean"); - - b.Property("LockoutEnd") - .HasColumnType("timestamp with time zone"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PasswordHash") - .HasColumnType("text"); - - b.Property("PhoneNumber") - .HasColumnType("text"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("boolean"); - - b.Property("PortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("RefreshToken") - .HasMaxLength(44) - .HasColumnType("character varying(44)"); - - b.Property("RefreshTokenExpiryTime") - .HasColumnType("timestamp with time zone"); - - b.Property("SecurityStamp") - .HasColumnType("text"); - - b.Property("TwoFactorEnabled") - .HasColumnType("boolean"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Notifications.Data.NotificationEvent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("EntityId") - .HasColumnType("uuid"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("EventType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("Message") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("MetadataJson") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("ReadAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RecipientEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("RecipientUserId") - .HasColumnType("uuid"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("RecipientUserId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("NotificationEvents", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Projects.Data.Project", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("EndDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Notes") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("StartDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("ClientId", "Name") - .IsUnique(); - - b.ToTable("Projects", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Workspaces.Data.Workspace", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("LogoUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("OwnerUserId") - .HasColumnType("uuid"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("TimeZone") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.HasKey("Id"); - - b.HasIndex("OwnerUserId"); - - b.HasIndex("Slug") - .IsUnique(); - - b.ToTable("Workspaces", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Workspaces.Data.WorkspaceInvite", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("InvitedByUserId") - .HasColumnType("uuid"); - - b.Property("Role") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "Email", "Status"); - - b.ToTable("WorkspaceInvites", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithOne("Screenshot") - .HasForeignKey("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", "FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackTag", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("Tags") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackReport", b => - { - b.Navigation("Screenshot"); - - b.Navigation("Tags"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260430171123_AddFeedbackScreenshots.cs b/backend/src/Socialize.Api/Migrations/20260430171123_AddFeedbackScreenshots.cs deleted file mode 100644 index 9ba5b5b..0000000 --- a/backend/src/Socialize.Api/Migrations/20260430171123_AddFeedbackScreenshots.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - /// - public partial class AddFeedbackScreenshots : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "FeedbackScreenshots", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - FeedbackReportId = table.Column(type: "uuid", nullable: false), - FileName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - ContentType = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - SizeBytes = table.Column(type: "bigint", nullable: false), - BlobContainerName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - BlobName = table.Column(type: "character varying(512)", maxLength: 512, nullable: false), - CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PK_FeedbackScreenshots", x => x.Id); - table.ForeignKey( - name: "FK_FeedbackScreenshots_FeedbackReports_FeedbackReportId", - column: x => x.FeedbackReportId, - principalTable: "FeedbackReports", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_FeedbackScreenshots_FeedbackReportId", - table: "FeedbackScreenshots", - column: "FeedbackReportId", - unique: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "FeedbackScreenshots"); - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260430171959_AddFeedbackCommentsActivity.Designer.cs b/backend/src/Socialize.Api/Migrations/20260430171959_AddFeedbackCommentsActivity.Designer.cs deleted file mode 100644 index 8ee4364..0000000 --- a/backend/src/Socialize.Api/Migrations/20260430171959_AddFeedbackCommentsActivity.Designer.cs +++ /dev/null @@ -1,1292 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Socialize.Api.Data; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - [DbContext(typeof(AppDbContext))] - [Migration("20260430171959_AddFeedbackCommentsActivity")] - partial class AddFeedbackCommentsActivity - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "10.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("ProviderKey") - .HasColumnType("text"); - - b.Property("ProviderDisplayName") - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("Value") - .HasColumnType("text"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.ApprovalDecision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ApprovalRequestId") - .HasColumnType("uuid"); - - b.Property("Comment") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DecidedByEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DecidedByName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DecidedByUserId") - .HasColumnType("uuid"); - - b.Property("Decision") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("ApprovalRequestId"); - - b.ToTable("ApprovalDecisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.ApprovalRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessToken") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("CompletedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("DueAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RequestedByUserId") - .HasColumnType("uuid"); - - b.Property("ReviewerEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReviewerName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("SentAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Stage") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("State") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ReviewerEmail"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("ApprovalRequests", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Assets.Data.Asset", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AssetType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CurrentRevisionNumber") - .HasColumnType("integer"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleDriveFileId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleDriveLink") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("PreviewUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("SourceType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("Assets", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Assets.Data.AssetRevision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AssetId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CreatedByUserId") - .HasColumnType("uuid"); - - b.Property("Notes") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PreviewUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("RevisionNumber") - .HasColumnType("integer"); - - b.Property("SourceReference") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.HasKey("Id"); - - b.HasIndex("AssetId"); - - b.HasIndex("AssetId", "RevisionNumber") - .IsUnique(); - - b.ToTable("AssetRevisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Clients.Data.Client", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("PrimaryContactEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PrimaryContactName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PrimaryContactPortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "Name") - .IsUnique(); - - b.ToTable("Clients", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Comments.Data.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuthorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorUserId") - .HasColumnType("uuid"); - - b.Property("Body") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("IsResolved") - .HasColumnType("boolean"); - - b.Property("ParentCommentId") - .HasColumnType("uuid"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ParentCommentId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("Comments", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.ContentItems.Data.ContentItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CurrentRevisionLabel") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("CurrentRevisionNumber") - .HasColumnType("integer"); - - b.Property("DueDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Hashtags") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("ProjectId") - .HasColumnType("uuid"); - - b.Property("PublicationMessage") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("PublicationTargets") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("ProjectId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("ContentItems", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.ContentItems.Data.ContentItemRevision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ChangeSummary") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CreatedByUserId") - .HasColumnType("uuid"); - - b.Property("Hashtags") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PublicationMessage") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("PublicationTargets") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("RevisionLabel") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("RevisionNumber") - .HasColumnType("integer"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ContentItemId", "RevisionNumber") - .IsUnique(); - - b.ToTable("ContentItemRevisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackActivityEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ActivityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ActorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ActorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ActorUserId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("FromValue") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Note") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("ToValue") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.HasKey("Id"); - - b.HasIndex("ActorUserId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("FeedbackReportId"); - - b.ToTable("FeedbackActivityEntries", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackComment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuthorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorRole") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("AuthorUserId") - .HasColumnType("uuid"); - - b.Property("Body") - .IsRequired() - .HasMaxLength(8000) - .HasColumnType("character varying(8000)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("AuthorUserId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("FeedbackReportId"); - - b.ToTable("FeedbackComments", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AppVersion") - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("BrowserUserAgent") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("CancellationReason") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("CancelledAt") - .HasColumnType("timestamp with time zone"); - - b.Property("CancelledByUserId") - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("ClientName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("ContentItemTitle") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(8000) - .HasColumnType("character varying(8000)"); - - b.Property("LastActivityAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ProjectId") - .HasColumnType("uuid"); - - b.Property("ProjectName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterUserId") - .HasColumnType("uuid"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("SubmittedPath") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("ViewportHeight") - .HasColumnType("integer"); - - b.Property("ViewportWidth") - .HasColumnType("integer"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.Property("WorkspaceName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("LastActivityAt"); - - b.HasIndex("ReporterUserId"); - - b.HasIndex("Status"); - - b.HasIndex("Type"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("FeedbackReports", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("BlobContainerName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("BlobName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("ContentType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("SizeBytes") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("FeedbackReportId") - .IsUnique(); - - b.ToTable("FeedbackScreenshots", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.HasIndex("FeedbackReportId", "NormalizedName") - .IsUnique(); - - b.ToTable("FeedbackTags", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Identity.Data.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Identity.Data.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessFailedCount") - .HasColumnType("integer"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Alias") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("BirthDate") - .HasColumnType("timestamp with time zone"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("boolean"); - - b.Property("FacebookId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Firstname") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Lastname") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("LockoutEnabled") - .HasColumnType("boolean"); - - b.Property("LockoutEnd") - .HasColumnType("timestamp with time zone"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PasswordHash") - .HasColumnType("text"); - - b.Property("PhoneNumber") - .HasColumnType("text"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("boolean"); - - b.Property("PortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("RefreshToken") - .HasMaxLength(44) - .HasColumnType("character varying(44)"); - - b.Property("RefreshTokenExpiryTime") - .HasColumnType("timestamp with time zone"); - - b.Property("SecurityStamp") - .HasColumnType("text"); - - b.Property("TwoFactorEnabled") - .HasColumnType("boolean"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Notifications.Data.NotificationEvent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("EntityId") - .HasColumnType("uuid"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("EventType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("Message") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("MetadataJson") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("ReadAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RecipientEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("RecipientUserId") - .HasColumnType("uuid"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("RecipientUserId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("NotificationEvents", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Projects.Data.Project", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("EndDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Notes") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("StartDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("ClientId", "Name") - .IsUnique(); - - b.ToTable("Projects", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Workspaces.Data.Workspace", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("LogoUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("OwnerUserId") - .HasColumnType("uuid"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("TimeZone") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.HasKey("Id"); - - b.HasIndex("OwnerUserId"); - - b.HasIndex("Slug") - .IsUnique(); - - b.ToTable("Workspaces", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Workspaces.Data.WorkspaceInvite", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("InvitedByUserId") - .HasColumnType("uuid"); - - b.Property("Role") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "Email", "Status"); - - b.ToTable("WorkspaceInvites", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackActivityEntry", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("ActivityEntries") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackComment", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("Comments") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithOne("Screenshot") - .HasForeignKey("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", "FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackTag", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("Tags") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackReport", b => - { - b.Navigation("ActivityEntries"); - - b.Navigation("Comments"); - - b.Navigation("Screenshot"); - - b.Navigation("Tags"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260430171959_AddFeedbackCommentsActivity.cs b/backend/src/Socialize.Api/Migrations/20260430171959_AddFeedbackCommentsActivity.cs deleted file mode 100644 index 1a71faf..0000000 --- a/backend/src/Socialize.Api/Migrations/20260430171959_AddFeedbackCommentsActivity.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - /// - public partial class AddFeedbackCommentsActivity : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "FeedbackActivityEntries", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - FeedbackReportId = table.Column(type: "uuid", nullable: false), - ActorUserId = table.Column(type: "uuid", nullable: false), - ActorDisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - ActorEmail = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - ActivityType = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), - FromValue = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), - ToValue = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), - Note = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), - CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PK_FeedbackActivityEntries", x => x.Id); - table.ForeignKey( - name: "FK_FeedbackActivityEntries_FeedbackReports_FeedbackReportId", - column: x => x.FeedbackReportId, - principalTable: "FeedbackReports", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "FeedbackComments", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - FeedbackReportId = table.Column(type: "uuid", nullable: false), - AuthorUserId = table.Column(type: "uuid", nullable: false), - AuthorDisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - AuthorEmail = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - AuthorRole = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), - Body = table.Column(type: "character varying(8000)", maxLength: 8000, nullable: false), - CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PK_FeedbackComments", x => x.Id); - table.ForeignKey( - name: "FK_FeedbackComments_FeedbackReports_FeedbackReportId", - column: x => x.FeedbackReportId, - principalTable: "FeedbackReports", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_FeedbackActivityEntries_ActorUserId", - table: "FeedbackActivityEntries", - column: "ActorUserId"); - - migrationBuilder.CreateIndex( - name: "IX_FeedbackActivityEntries_CreatedAt", - table: "FeedbackActivityEntries", - column: "CreatedAt"); - - migrationBuilder.CreateIndex( - name: "IX_FeedbackActivityEntries_FeedbackReportId", - table: "FeedbackActivityEntries", - column: "FeedbackReportId"); - - migrationBuilder.CreateIndex( - name: "IX_FeedbackComments_AuthorUserId", - table: "FeedbackComments", - column: "AuthorUserId"); - - migrationBuilder.CreateIndex( - name: "IX_FeedbackComments_CreatedAt", - table: "FeedbackComments", - column: "CreatedAt"); - - migrationBuilder.CreateIndex( - name: "IX_FeedbackComments_FeedbackReportId", - table: "FeedbackComments", - column: "FeedbackReportId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "FeedbackActivityEntries"); - - migrationBuilder.DropTable( - name: "FeedbackComments"); - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260501170646_AddWorkspaceApprovalConfiguration.Designer.cs b/backend/src/Socialize.Api/Migrations/20260501170646_AddWorkspaceApprovalConfiguration.Designer.cs deleted file mode 100644 index 05eb069..0000000 --- a/backend/src/Socialize.Api/Migrations/20260501170646_AddWorkspaceApprovalConfiguration.Designer.cs +++ /dev/null @@ -1,1314 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Socialize.Api.Data; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - [DbContext(typeof(AppDbContext))] - [Migration("20260501170646_AddWorkspaceApprovalConfiguration")] - partial class AddWorkspaceApprovalConfiguration - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "10.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("ProviderKey") - .HasColumnType("text"); - - b.Property("ProviderDisplayName") - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("Value") - .HasColumnType("text"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.ApprovalDecision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ApprovalRequestId") - .HasColumnType("uuid"); - - b.Property("Comment") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DecidedByEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DecidedByName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DecidedByUserId") - .HasColumnType("uuid"); - - b.Property("Decision") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("ApprovalRequestId"); - - b.ToTable("ApprovalDecisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.ApprovalRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessToken") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("CompletedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("DueAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RequestedByUserId") - .HasColumnType("uuid"); - - b.Property("ReviewerEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReviewerName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("SentAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Stage") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("State") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ReviewerEmail"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("ApprovalRequests", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Assets.Data.Asset", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AssetType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CurrentRevisionNumber") - .HasColumnType("integer"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleDriveFileId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleDriveLink") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("PreviewUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("SourceType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("Assets", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Assets.Data.AssetRevision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AssetId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CreatedByUserId") - .HasColumnType("uuid"); - - b.Property("Notes") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PreviewUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("RevisionNumber") - .HasColumnType("integer"); - - b.Property("SourceReference") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.HasKey("Id"); - - b.HasIndex("AssetId"); - - b.HasIndex("AssetId", "RevisionNumber") - .IsUnique(); - - b.ToTable("AssetRevisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Clients.Data.Client", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("PrimaryContactEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PrimaryContactName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PrimaryContactPortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "Name") - .IsUnique(); - - b.ToTable("Clients", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Comments.Data.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuthorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorUserId") - .HasColumnType("uuid"); - - b.Property("Body") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("IsResolved") - .HasColumnType("boolean"); - - b.Property("ParentCommentId") - .HasColumnType("uuid"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ParentCommentId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("Comments", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.ContentItems.Data.ContentItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CurrentRevisionLabel") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("CurrentRevisionNumber") - .HasColumnType("integer"); - - b.Property("DueDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Hashtags") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("ProjectId") - .HasColumnType("uuid"); - - b.Property("PublicationMessage") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("PublicationTargets") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("ProjectId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("ContentItems", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.ContentItems.Data.ContentItemRevision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ChangeSummary") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CreatedByUserId") - .HasColumnType("uuid"); - - b.Property("Hashtags") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PublicationMessage") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("PublicationTargets") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("RevisionLabel") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("RevisionNumber") - .HasColumnType("integer"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ContentItemId", "RevisionNumber") - .IsUnique(); - - b.ToTable("ContentItemRevisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackActivityEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ActivityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ActorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ActorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ActorUserId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("FromValue") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Note") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("ToValue") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.HasKey("Id"); - - b.HasIndex("ActorUserId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("FeedbackReportId"); - - b.ToTable("FeedbackActivityEntries", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackComment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuthorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorRole") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("AuthorUserId") - .HasColumnType("uuid"); - - b.Property("Body") - .IsRequired() - .HasMaxLength(8000) - .HasColumnType("character varying(8000)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("AuthorUserId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("FeedbackReportId"); - - b.ToTable("FeedbackComments", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AppVersion") - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("BrowserUserAgent") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("CancellationReason") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("CancelledAt") - .HasColumnType("timestamp with time zone"); - - b.Property("CancelledByUserId") - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("ClientName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("ContentItemTitle") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(8000) - .HasColumnType("character varying(8000)"); - - b.Property("LastActivityAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ProjectId") - .HasColumnType("uuid"); - - b.Property("ProjectName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterUserId") - .HasColumnType("uuid"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("SubmittedPath") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("ViewportHeight") - .HasColumnType("integer"); - - b.Property("ViewportWidth") - .HasColumnType("integer"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.Property("WorkspaceName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("LastActivityAt"); - - b.HasIndex("ReporterUserId"); - - b.HasIndex("Status"); - - b.HasIndex("Type"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("FeedbackReports", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("BlobContainerName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("BlobName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("ContentType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("SizeBytes") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("FeedbackReportId") - .IsUnique(); - - b.ToTable("FeedbackScreenshots", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.HasIndex("FeedbackReportId", "NormalizedName") - .IsUnique(); - - b.ToTable("FeedbackTags", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Identity.Data.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Identity.Data.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessFailedCount") - .HasColumnType("integer"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Alias") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("BirthDate") - .HasColumnType("timestamp with time zone"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("boolean"); - - b.Property("FacebookId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Firstname") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Lastname") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("LockoutEnabled") - .HasColumnType("boolean"); - - b.Property("LockoutEnd") - .HasColumnType("timestamp with time zone"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PasswordHash") - .HasColumnType("text"); - - b.Property("PhoneNumber") - .HasColumnType("text"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("boolean"); - - b.Property("PortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("RefreshToken") - .HasMaxLength(44) - .HasColumnType("character varying(44)"); - - b.Property("RefreshTokenExpiryTime") - .HasColumnType("timestamp with time zone"); - - b.Property("SecurityStamp") - .HasColumnType("text"); - - b.Property("TwoFactorEnabled") - .HasColumnType("boolean"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Notifications.Data.NotificationEvent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("EntityId") - .HasColumnType("uuid"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("EventType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("Message") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("MetadataJson") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("ReadAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RecipientEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("RecipientUserId") - .HasColumnType("uuid"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("RecipientUserId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("NotificationEvents", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Projects.Data.Project", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("EndDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Notes") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("StartDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("ClientId", "Name") - .IsUnique(); - - b.ToTable("Projects", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Workspaces.Data.Workspace", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ApprovalMode") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasDefaultValue("Required"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("LockContentAfterApproval") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false); - - b.Property("LogoUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("OwnerUserId") - .HasColumnType("uuid"); - - b.Property("SchedulePostsAutomaticallyOnApproval") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false); - - b.Property("SendAutomaticApprovalReminders") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("TimeZone") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.HasKey("Id"); - - b.HasIndex("OwnerUserId"); - - b.HasIndex("Slug") - .IsUnique(); - - b.ToTable("Workspaces", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Workspaces.Data.WorkspaceInvite", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("InvitedByUserId") - .HasColumnType("uuid"); - - b.Property("Role") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "Email", "Status"); - - b.ToTable("WorkspaceInvites", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackActivityEntry", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("ActivityEntries") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackComment", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("Comments") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithOne("Screenshot") - .HasForeignKey("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", "FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackTag", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("Tags") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackReport", b => - { - b.Navigation("ActivityEntries"); - - b.Navigation("Comments"); - - b.Navigation("Screenshot"); - - b.Navigation("Tags"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260501170646_AddWorkspaceApprovalConfiguration.cs b/backend/src/Socialize.Api/Migrations/20260501170646_AddWorkspaceApprovalConfiguration.cs deleted file mode 100644 index 89a5f4c..0000000 --- a/backend/src/Socialize.Api/Migrations/20260501170646_AddWorkspaceApprovalConfiguration.cs +++ /dev/null @@ -1,63 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - /// - public partial class AddWorkspaceApprovalConfiguration : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "ApprovalMode", - table: "Workspaces", - type: "character varying(32)", - maxLength: 32, - nullable: false, - defaultValue: "Required"); - - migrationBuilder.AddColumn( - name: "LockContentAfterApproval", - table: "Workspaces", - type: "boolean", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "SchedulePostsAutomaticallyOnApproval", - table: "Workspaces", - type: "boolean", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "SendAutomaticApprovalReminders", - table: "Workspaces", - type: "boolean", - nullable: false, - defaultValue: false); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ApprovalMode", - table: "Workspaces"); - - migrationBuilder.DropColumn( - name: "LockContentAfterApproval", - table: "Workspaces"); - - migrationBuilder.DropColumn( - name: "SchedulePostsAutomaticallyOnApproval", - table: "Workspaces"); - - migrationBuilder.DropColumn( - name: "SendAutomaticApprovalReminders", - table: "Workspaces"); - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260501173710_AddWorkspaceApprovalStepConfiguration.Designer.cs b/backend/src/Socialize.Api/Migrations/20260501173710_AddWorkspaceApprovalStepConfiguration.Designer.cs deleted file mode 100644 index 4b77e9d..0000000 --- a/backend/src/Socialize.Api/Migrations/20260501173710_AddWorkspaceApprovalStepConfiguration.Designer.cs +++ /dev/null @@ -1,1361 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Socialize.Api.Data; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - [DbContext(typeof(AppDbContext))] - [Migration("20260501173710_AddWorkspaceApprovalStepConfiguration")] - partial class AddWorkspaceApprovalStepConfiguration - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "10.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("ProviderKey") - .HasColumnType("text"); - - b.Property("ProviderDisplayName") - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("Value") - .HasColumnType("text"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.ApprovalDecision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ApprovalRequestId") - .HasColumnType("uuid"); - - b.Property("Comment") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DecidedByEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DecidedByName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DecidedByUserId") - .HasColumnType("uuid"); - - b.Property("Decision") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("ApprovalRequestId"); - - b.ToTable("ApprovalDecisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.ApprovalRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessToken") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("CompletedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("DueAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RequestedByUserId") - .HasColumnType("uuid"); - - b.Property("ReviewerEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReviewerName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("SentAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Stage") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("State") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ReviewerEmail"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("ApprovalRequests", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.WorkspaceApprovalStepConfiguration", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("RequiredApproverCount") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(1); - - b.Property("SortOrder") - .HasColumnType("integer"); - - b.Property("TargetType") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("TargetValue") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "SortOrder") - .IsUnique(); - - b.ToTable("WorkspaceApprovalStepConfigurations", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Assets.Data.Asset", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AssetType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CurrentRevisionNumber") - .HasColumnType("integer"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleDriveFileId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleDriveLink") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("PreviewUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("SourceType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("Assets", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Assets.Data.AssetRevision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AssetId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CreatedByUserId") - .HasColumnType("uuid"); - - b.Property("Notes") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PreviewUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("RevisionNumber") - .HasColumnType("integer"); - - b.Property("SourceReference") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.HasKey("Id"); - - b.HasIndex("AssetId"); - - b.HasIndex("AssetId", "RevisionNumber") - .IsUnique(); - - b.ToTable("AssetRevisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Clients.Data.Client", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("PrimaryContactEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PrimaryContactName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PrimaryContactPortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "Name") - .IsUnique(); - - b.ToTable("Clients", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Comments.Data.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuthorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorUserId") - .HasColumnType("uuid"); - - b.Property("Body") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("IsResolved") - .HasColumnType("boolean"); - - b.Property("ParentCommentId") - .HasColumnType("uuid"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ParentCommentId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("Comments", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.ContentItems.Data.ContentItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CurrentRevisionLabel") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("CurrentRevisionNumber") - .HasColumnType("integer"); - - b.Property("DueDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Hashtags") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("ProjectId") - .HasColumnType("uuid"); - - b.Property("PublicationMessage") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("PublicationTargets") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("ProjectId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("ContentItems", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.ContentItems.Data.ContentItemRevision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ChangeSummary") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CreatedByUserId") - .HasColumnType("uuid"); - - b.Property("Hashtags") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PublicationMessage") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("PublicationTargets") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("RevisionLabel") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("RevisionNumber") - .HasColumnType("integer"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ContentItemId", "RevisionNumber") - .IsUnique(); - - b.ToTable("ContentItemRevisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackActivityEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ActivityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ActorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ActorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ActorUserId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("FromValue") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Note") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("ToValue") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.HasKey("Id"); - - b.HasIndex("ActorUserId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("FeedbackReportId"); - - b.ToTable("FeedbackActivityEntries", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackComment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuthorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorRole") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("AuthorUserId") - .HasColumnType("uuid"); - - b.Property("Body") - .IsRequired() - .HasMaxLength(8000) - .HasColumnType("character varying(8000)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("AuthorUserId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("FeedbackReportId"); - - b.ToTable("FeedbackComments", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AppVersion") - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("BrowserUserAgent") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("CancellationReason") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("CancelledAt") - .HasColumnType("timestamp with time zone"); - - b.Property("CancelledByUserId") - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("ClientName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("ContentItemTitle") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(8000) - .HasColumnType("character varying(8000)"); - - b.Property("LastActivityAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ProjectId") - .HasColumnType("uuid"); - - b.Property("ProjectName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterUserId") - .HasColumnType("uuid"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("SubmittedPath") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("ViewportHeight") - .HasColumnType("integer"); - - b.Property("ViewportWidth") - .HasColumnType("integer"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.Property("WorkspaceName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("LastActivityAt"); - - b.HasIndex("ReporterUserId"); - - b.HasIndex("Status"); - - b.HasIndex("Type"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("FeedbackReports", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("BlobContainerName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("BlobName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("ContentType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("SizeBytes") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("FeedbackReportId") - .IsUnique(); - - b.ToTable("FeedbackScreenshots", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.HasIndex("FeedbackReportId", "NormalizedName") - .IsUnique(); - - b.ToTable("FeedbackTags", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Identity.Data.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Identity.Data.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessFailedCount") - .HasColumnType("integer"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Alias") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("BirthDate") - .HasColumnType("timestamp with time zone"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("boolean"); - - b.Property("FacebookId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Firstname") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Lastname") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("LockoutEnabled") - .HasColumnType("boolean"); - - b.Property("LockoutEnd") - .HasColumnType("timestamp with time zone"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PasswordHash") - .HasColumnType("text"); - - b.Property("PhoneNumber") - .HasColumnType("text"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("boolean"); - - b.Property("PortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("RefreshToken") - .HasMaxLength(44) - .HasColumnType("character varying(44)"); - - b.Property("RefreshTokenExpiryTime") - .HasColumnType("timestamp with time zone"); - - b.Property("SecurityStamp") - .HasColumnType("text"); - - b.Property("TwoFactorEnabled") - .HasColumnType("boolean"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Notifications.Data.NotificationEvent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("EntityId") - .HasColumnType("uuid"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("EventType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("Message") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("MetadataJson") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("ReadAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RecipientEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("RecipientUserId") - .HasColumnType("uuid"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("RecipientUserId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("NotificationEvents", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Projects.Data.Project", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("EndDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Notes") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("StartDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("ClientId", "Name") - .IsUnique(); - - b.ToTable("Projects", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Workspaces.Data.Workspace", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ApprovalMode") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasDefaultValue("Required"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("LockContentAfterApproval") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false); - - b.Property("LogoUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("OwnerUserId") - .HasColumnType("uuid"); - - b.Property("SchedulePostsAutomaticallyOnApproval") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false); - - b.Property("SendAutomaticApprovalReminders") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("TimeZone") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.HasKey("Id"); - - b.HasIndex("OwnerUserId"); - - b.HasIndex("Slug") - .IsUnique(); - - b.ToTable("Workspaces", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Workspaces.Data.WorkspaceInvite", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("InvitedByUserId") - .HasColumnType("uuid"); - - b.Property("Role") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "Email", "Status"); - - b.ToTable("WorkspaceInvites", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackActivityEntry", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("ActivityEntries") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackComment", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("Comments") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithOne("Screenshot") - .HasForeignKey("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", "FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackTag", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("Tags") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackReport", b => - { - b.Navigation("ActivityEntries"); - - b.Navigation("Comments"); - - b.Navigation("Screenshot"); - - b.Navigation("Tags"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260501173710_AddWorkspaceApprovalStepConfiguration.cs b/backend/src/Socialize.Api/Migrations/20260501173710_AddWorkspaceApprovalStepConfiguration.cs deleted file mode 100644 index 07c9db6..0000000 --- a/backend/src/Socialize.Api/Migrations/20260501173710_AddWorkspaceApprovalStepConfiguration.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - /// - public partial class AddWorkspaceApprovalStepConfiguration : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "WorkspaceApprovalStepConfigurations", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - WorkspaceId = table.Column(type: "uuid", nullable: false), - Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - SortOrder = table.Column(type: "integer", nullable: false), - TargetType = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), - TargetValue = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - RequiredApproverCount = table.Column(type: "integer", nullable: false, defaultValue: 1), - CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PK_WorkspaceApprovalStepConfigurations", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_WorkspaceApprovalStepConfigurations_WorkspaceId", - table: "WorkspaceApprovalStepConfigurations", - column: "WorkspaceId"); - - migrationBuilder.CreateIndex( - name: "IX_WorkspaceApprovalStepConfigurations_WorkspaceId_SortOrder", - table: "WorkspaceApprovalStepConfigurations", - columns: new[] { "WorkspaceId", "SortOrder" }, - unique: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "WorkspaceApprovalStepConfigurations"); - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260501175648_AddApprovalWorkflowRuntime.Designer.cs b/backend/src/Socialize.Api/Migrations/20260501175648_AddApprovalWorkflowRuntime.Designer.cs deleted file mode 100644 index 8997cd7..0000000 --- a/backend/src/Socialize.Api/Migrations/20260501175648_AddApprovalWorkflowRuntime.Designer.cs +++ /dev/null @@ -1,1423 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Socialize.Api.Data; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - [DbContext(typeof(AppDbContext))] - [Migration("20260501175648_AddApprovalWorkflowRuntime")] - partial class AddApprovalWorkflowRuntime - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "10.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("ProviderKey") - .HasColumnType("text"); - - b.Property("ProviderDisplayName") - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("Value") - .HasColumnType("text"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.ApprovalDecision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ApprovalRequestId") - .HasColumnType("uuid"); - - b.Property("Comment") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DecidedByEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DecidedByName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DecidedByUserId") - .HasColumnType("uuid"); - - b.Property("Decision") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("ApprovalRequestId"); - - b.ToTable("ApprovalDecisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.ApprovalRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessToken") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("CompletedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("DueAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RequestedByUserId") - .HasColumnType("uuid"); - - b.Property("ReviewerEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReviewerName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("SentAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Stage") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("State") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkflowInstanceId") - .HasColumnType("uuid"); - - b.Property("WorkflowStepRequiredApproverCount") - .HasColumnType("integer"); - - b.Property("WorkflowStepSortOrder") - .HasColumnType("integer"); - - b.Property("WorkflowStepTargetType") - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("WorkflowStepTargetValue") - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ReviewerEmail"); - - b.HasIndex("WorkflowInstanceId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("ApprovalRequests", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.ApprovalWorkflowInstance", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ApprovalMode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("CompletedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("StartedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("State") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("ContentItemId", "State") - .IsUnique() - .HasFilter("\"State\" = 'Pending'"); - - b.ToTable("ApprovalWorkflowInstances", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.WorkspaceApprovalStepConfiguration", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("RequiredApproverCount") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(1); - - b.Property("SortOrder") - .HasColumnType("integer"); - - b.Property("TargetType") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("TargetValue") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "SortOrder") - .IsUnique(); - - b.ToTable("WorkspaceApprovalStepConfigurations", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Assets.Data.Asset", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AssetType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CurrentRevisionNumber") - .HasColumnType("integer"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleDriveFileId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleDriveLink") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("PreviewUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("SourceType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("Assets", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Assets.Data.AssetRevision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AssetId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CreatedByUserId") - .HasColumnType("uuid"); - - b.Property("Notes") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PreviewUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("RevisionNumber") - .HasColumnType("integer"); - - b.Property("SourceReference") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.HasKey("Id"); - - b.HasIndex("AssetId"); - - b.HasIndex("AssetId", "RevisionNumber") - .IsUnique(); - - b.ToTable("AssetRevisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Clients.Data.Client", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("PrimaryContactEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PrimaryContactName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PrimaryContactPortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "Name") - .IsUnique(); - - b.ToTable("Clients", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Comments.Data.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuthorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorUserId") - .HasColumnType("uuid"); - - b.Property("Body") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("IsResolved") - .HasColumnType("boolean"); - - b.Property("ParentCommentId") - .HasColumnType("uuid"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ParentCommentId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("Comments", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.ContentItems.Data.ContentItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CurrentRevisionLabel") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("CurrentRevisionNumber") - .HasColumnType("integer"); - - b.Property("DueDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Hashtags") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("ProjectId") - .HasColumnType("uuid"); - - b.Property("PublicationMessage") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("PublicationTargets") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("ProjectId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("ContentItems", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.ContentItems.Data.ContentItemRevision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ChangeSummary") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CreatedByUserId") - .HasColumnType("uuid"); - - b.Property("Hashtags") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PublicationMessage") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("PublicationTargets") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("RevisionLabel") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("RevisionNumber") - .HasColumnType("integer"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ContentItemId", "RevisionNumber") - .IsUnique(); - - b.ToTable("ContentItemRevisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackActivityEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ActivityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ActorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ActorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ActorUserId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("FromValue") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Note") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("ToValue") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.HasKey("Id"); - - b.HasIndex("ActorUserId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("FeedbackReportId"); - - b.ToTable("FeedbackActivityEntries", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackComment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuthorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorRole") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("AuthorUserId") - .HasColumnType("uuid"); - - b.Property("Body") - .IsRequired() - .HasMaxLength(8000) - .HasColumnType("character varying(8000)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("AuthorUserId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("FeedbackReportId"); - - b.ToTable("FeedbackComments", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AppVersion") - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("BrowserUserAgent") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("CancellationReason") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("CancelledAt") - .HasColumnType("timestamp with time zone"); - - b.Property("CancelledByUserId") - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("ClientName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("ContentItemTitle") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(8000) - .HasColumnType("character varying(8000)"); - - b.Property("LastActivityAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ProjectId") - .HasColumnType("uuid"); - - b.Property("ProjectName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterUserId") - .HasColumnType("uuid"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("SubmittedPath") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("ViewportHeight") - .HasColumnType("integer"); - - b.Property("ViewportWidth") - .HasColumnType("integer"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.Property("WorkspaceName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("LastActivityAt"); - - b.HasIndex("ReporterUserId"); - - b.HasIndex("Status"); - - b.HasIndex("Type"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("FeedbackReports", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("BlobContainerName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("BlobName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("ContentType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("SizeBytes") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("FeedbackReportId") - .IsUnique(); - - b.ToTable("FeedbackScreenshots", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.HasIndex("FeedbackReportId", "NormalizedName") - .IsUnique(); - - b.ToTable("FeedbackTags", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Identity.Data.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Identity.Data.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessFailedCount") - .HasColumnType("integer"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Alias") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("BirthDate") - .HasColumnType("timestamp with time zone"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("boolean"); - - b.Property("FacebookId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Firstname") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Lastname") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("LockoutEnabled") - .HasColumnType("boolean"); - - b.Property("LockoutEnd") - .HasColumnType("timestamp with time zone"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PasswordHash") - .HasColumnType("text"); - - b.Property("PhoneNumber") - .HasColumnType("text"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("boolean"); - - b.Property("PortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("RefreshToken") - .HasMaxLength(44) - .HasColumnType("character varying(44)"); - - b.Property("RefreshTokenExpiryTime") - .HasColumnType("timestamp with time zone"); - - b.Property("SecurityStamp") - .HasColumnType("text"); - - b.Property("TwoFactorEnabled") - .HasColumnType("boolean"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Notifications.Data.NotificationEvent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("EntityId") - .HasColumnType("uuid"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("EventType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("Message") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("MetadataJson") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("ReadAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RecipientEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("RecipientUserId") - .HasColumnType("uuid"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("RecipientUserId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("NotificationEvents", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Projects.Data.Project", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("EndDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Notes") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("StartDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("ClientId", "Name") - .IsUnique(); - - b.ToTable("Projects", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Workspaces.Data.Workspace", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ApprovalMode") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasDefaultValue("Required"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("LockContentAfterApproval") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false); - - b.Property("LogoUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("OwnerUserId") - .HasColumnType("uuid"); - - b.Property("SchedulePostsAutomaticallyOnApproval") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false); - - b.Property("SendAutomaticApprovalReminders") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("TimeZone") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.HasKey("Id"); - - b.HasIndex("OwnerUserId"); - - b.HasIndex("Slug") - .IsUnique(); - - b.ToTable("Workspaces", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Workspaces.Data.WorkspaceInvite", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("InvitedByUserId") - .HasColumnType("uuid"); - - b.Property("Role") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "Email", "Status"); - - b.ToTable("WorkspaceInvites", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackActivityEntry", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("ActivityEntries") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackComment", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("Comments") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithOne("Screenshot") - .HasForeignKey("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", "FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackTag", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("Tags") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackReport", b => - { - b.Navigation("ActivityEntries"); - - b.Navigation("Comments"); - - b.Navigation("Screenshot"); - - b.Navigation("Tags"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260501175648_AddApprovalWorkflowRuntime.cs b/backend/src/Socialize.Api/Migrations/20260501175648_AddApprovalWorkflowRuntime.cs deleted file mode 100644 index 467b193..0000000 --- a/backend/src/Socialize.Api/Migrations/20260501175648_AddApprovalWorkflowRuntime.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - /// - public partial class AddApprovalWorkflowRuntime : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "WorkflowInstanceId", - table: "ApprovalRequests", - type: "uuid", - nullable: true); - - migrationBuilder.AddColumn( - name: "WorkflowStepRequiredApproverCount", - table: "ApprovalRequests", - type: "integer", - nullable: true); - - migrationBuilder.AddColumn( - name: "WorkflowStepSortOrder", - table: "ApprovalRequests", - type: "integer", - nullable: true); - - migrationBuilder.AddColumn( - name: "WorkflowStepTargetType", - table: "ApprovalRequests", - type: "character varying(32)", - maxLength: 32, - nullable: true); - - migrationBuilder.AddColumn( - name: "WorkflowStepTargetValue", - table: "ApprovalRequests", - type: "character varying(128)", - maxLength: 128, - nullable: true); - - migrationBuilder.CreateTable( - name: "ApprovalWorkflowInstances", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - WorkspaceId = table.Column(type: "uuid", nullable: false), - ContentItemId = table.Column(type: "uuid", nullable: false), - State = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), - ApprovalMode = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), - StartedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - CompletedAt = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_ApprovalWorkflowInstances", x => x.Id); - }); - - migrationBuilder.CreateIndex( - name: "IX_ApprovalRequests_WorkflowInstanceId", - table: "ApprovalRequests", - column: "WorkflowInstanceId"); - - migrationBuilder.CreateIndex( - name: "IX_ApprovalWorkflowInstances_ContentItemId", - table: "ApprovalWorkflowInstances", - column: "ContentItemId"); - - migrationBuilder.CreateIndex( - name: "IX_ApprovalWorkflowInstances_ContentItemId_State", - table: "ApprovalWorkflowInstances", - columns: new[] { "ContentItemId", "State" }, - unique: true, - filter: "\"State\" = 'Pending'"); - - migrationBuilder.CreateIndex( - name: "IX_ApprovalWorkflowInstances_WorkspaceId", - table: "ApprovalWorkflowInstances", - column: "WorkspaceId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "ApprovalWorkflowInstances"); - - migrationBuilder.DropIndex( - name: "IX_ApprovalRequests_WorkflowInstanceId", - table: "ApprovalRequests"); - - migrationBuilder.DropColumn( - name: "WorkflowInstanceId", - table: "ApprovalRequests"); - - migrationBuilder.DropColumn( - name: "WorkflowStepRequiredApproverCount", - table: "ApprovalRequests"); - - migrationBuilder.DropColumn( - name: "WorkflowStepSortOrder", - table: "ApprovalRequests"); - - migrationBuilder.DropColumn( - name: "WorkflowStepTargetType", - table: "ApprovalRequests"); - - migrationBuilder.DropColumn( - name: "WorkflowStepTargetValue", - table: "ApprovalRequests"); - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260501191447_RenameProjectsToCampaigns.Designer.cs b/backend/src/Socialize.Api/Migrations/20260501191447_RenameProjectsToCampaigns.Designer.cs deleted file mode 100644 index f3a37d7..0000000 --- a/backend/src/Socialize.Api/Migrations/20260501191447_RenameProjectsToCampaigns.Designer.cs +++ /dev/null @@ -1,1423 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Socialize.Api.Data; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - [DbContext(typeof(AppDbContext))] - [Migration("20260501191447_RenameProjectsToCampaigns")] - partial class RenameProjectsToCampaigns - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "10.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("ProviderKey") - .HasColumnType("text"); - - b.Property("ProviderDisplayName") - .HasColumnType("text"); - - b.Property("UserId") - .HasColumnType("uuid"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("RoleId") - .HasColumnType("uuid"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("Value") - .HasColumnType("text"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.ApprovalDecision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ApprovalRequestId") - .HasColumnType("uuid"); - - b.Property("Comment") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DecidedByEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DecidedByName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("DecidedByUserId") - .HasColumnType("uuid"); - - b.Property("Decision") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("ApprovalRequestId"); - - b.ToTable("ApprovalDecisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.ApprovalRequest", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessToken") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("CompletedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("DueAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RequestedByUserId") - .HasColumnType("uuid"); - - b.Property("ReviewerEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReviewerName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("SentAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Stage") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("State") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkflowInstanceId") - .HasColumnType("uuid"); - - b.Property("WorkflowStepRequiredApproverCount") - .HasColumnType("integer"); - - b.Property("WorkflowStepSortOrder") - .HasColumnType("integer"); - - b.Property("WorkflowStepTargetType") - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("WorkflowStepTargetValue") - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ReviewerEmail"); - - b.HasIndex("WorkflowInstanceId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("ApprovalRequests", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.ApprovalWorkflowInstance", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ApprovalMode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("CompletedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("StartedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("State") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("ContentItemId", "State") - .IsUnique() - .HasFilter("\"State\" = 'Pending'"); - - b.ToTable("ApprovalWorkflowInstances", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Approvals.Data.WorkspaceApprovalStepConfiguration", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("RequiredApproverCount") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(1); - - b.Property("SortOrder") - .HasColumnType("integer"); - - b.Property("TargetType") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("TargetValue") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "SortOrder") - .IsUnique(); - - b.ToTable("WorkspaceApprovalStepConfigurations", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Assets.Data.Asset", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AssetType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CurrentRevisionNumber") - .HasColumnType("integer"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleDriveFileId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleDriveLink") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("PreviewUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("SourceType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("Assets", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Assets.Data.AssetRevision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AssetId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CreatedByUserId") - .HasColumnType("uuid"); - - b.Property("Notes") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PreviewUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("RevisionNumber") - .HasColumnType("integer"); - - b.Property("SourceReference") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.HasKey("Id"); - - b.HasIndex("AssetId"); - - b.HasIndex("AssetId", "RevisionNumber") - .IsUnique(); - - b.ToTable("AssetRevisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Campaigns.Data.Campaign", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("EndDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Notes") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("StartDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("ClientId", "Name") - .IsUnique(); - - b.ToTable("Campaigns", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Clients.Data.Client", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("PrimaryContactEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PrimaryContactName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PrimaryContactPortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "Name") - .IsUnique(); - - b.ToTable("Clients", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Comments.Data.Comment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuthorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorUserId") - .HasColumnType("uuid"); - - b.Property("Body") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("IsResolved") - .HasColumnType("boolean"); - - b.Property("ParentCommentId") - .HasColumnType("uuid"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ParentCommentId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("Comments", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.ContentItems.Data.ContentItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CampaignId") - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CurrentRevisionLabel") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("CurrentRevisionNumber") - .HasColumnType("integer"); - - b.Property("DueDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Hashtags") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PublicationMessage") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("PublicationTargets") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("CampaignId"); - - b.HasIndex("ClientId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("ContentItems", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.ContentItems.Data.ContentItemRevision", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ChangeSummary") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("CreatedByUserId") - .HasColumnType("uuid"); - - b.Property("Hashtags") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("PublicationMessage") - .IsRequired() - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("PublicationTargets") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("RevisionLabel") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("RevisionNumber") - .HasColumnType("integer"); - - b.Property("Title") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("ContentItemId", "RevisionNumber") - .IsUnique(); - - b.ToTable("ContentItemRevisions", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackActivityEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ActivityType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("ActorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ActorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ActorUserId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("FromValue") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("Note") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("ToValue") - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.HasKey("Id"); - - b.HasIndex("ActorUserId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("FeedbackReportId"); - - b.ToTable("FeedbackActivityEntries", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackComment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AuthorDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("AuthorRole") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("AuthorUserId") - .HasColumnType("uuid"); - - b.Property("Body") - .IsRequired() - .HasMaxLength(8000) - .HasColumnType("character varying(8000)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("AuthorUserId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("FeedbackReportId"); - - b.ToTable("FeedbackComments", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AppVersion") - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("BrowserUserAgent") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("CampaignId") - .HasColumnType("uuid"); - - b.Property("CampaignName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("CancellationReason") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)"); - - b.Property("CancelledAt") - .HasColumnType("timestamp with time zone"); - - b.Property("CancelledByUserId") - .HasColumnType("uuid"); - - b.Property("ClientId") - .HasColumnType("uuid"); - - b.Property("ClientName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("ContentItemTitle") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(8000) - .HasColumnType("character varying(8000)"); - - b.Property("LastActivityAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ReporterDisplayName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("ReporterUserId") - .HasColumnType("uuid"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("SubmittedPath") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)"); - - b.Property("ViewportHeight") - .HasColumnType("integer"); - - b.Property("ViewportWidth") - .HasColumnType("integer"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.Property("WorkspaceName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("LastActivityAt"); - - b.HasIndex("ReporterUserId"); - - b.HasIndex("Status"); - - b.HasIndex("Type"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("FeedbackReports", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("BlobContainerName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("BlobName") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)"); - - b.Property("ContentType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("FileName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("SizeBytes") - .HasColumnType("bigint"); - - b.HasKey("Id"); - - b.HasIndex("FeedbackReportId") - .IsUnique(); - - b.ToTable("FeedbackScreenshots", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("FeedbackReportId") - .HasColumnType("uuid"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.HasIndex("FeedbackReportId", "NormalizedName") - .IsUnique(); - - b.ToTable("FeedbackTags", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Identity.Data.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Identity.Data.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("AccessFailedCount") - .HasColumnType("integer"); - - b.Property("Address") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Alias") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("BirthDate") - .HasColumnType("timestamp with time zone"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("boolean"); - - b.Property("FacebookId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Firstname") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("GoogleId") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("Lastname") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("LockoutEnabled") - .HasColumnType("boolean"); - - b.Property("LockoutEnd") - .HasColumnType("timestamp with time zone"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PasswordHash") - .HasColumnType("text"); - - b.Property("PhoneNumber") - .HasColumnType("text"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("boolean"); - - b.Property("PortraitUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("RefreshToken") - .HasMaxLength(44) - .HasColumnType("character varying(44)"); - - b.Property("RefreshTokenExpiryTime") - .HasColumnType("timestamp with time zone"); - - b.Property("SecurityStamp") - .HasColumnType("text"); - - b.Property("TwoFactorEnabled") - .HasColumnType("boolean"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Notifications.Data.NotificationEvent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ContentItemId") - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("EntityId") - .HasColumnType("uuid"); - - b.Property("EntityType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("EventType") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("Message") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)"); - - b.Property("MetadataJson") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)"); - - b.Property("ReadAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RecipientEmail") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("RecipientUserId") - .HasColumnType("uuid"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("ContentItemId"); - - b.HasIndex("CreatedAt"); - - b.HasIndex("RecipientUserId"); - - b.HasIndex("WorkspaceId"); - - b.ToTable("NotificationEvents", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Workspaces.Data.Workspace", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("ApprovalMode") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasDefaultValue("Required"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("LockContentAfterApproval") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false); - - b.Property("LogoUrl") - .HasMaxLength(2048) - .HasColumnType("character varying(2048)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("OwnerUserId") - .HasColumnType("uuid"); - - b.Property("SchedulePostsAutomaticallyOnApproval") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false); - - b.Property("SendAutomaticApprovalReminders") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.Property("TimeZone") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - - b.HasKey("Id"); - - b.HasIndex("OwnerUserId"); - - b.HasIndex("Slug") - .IsUnique(); - - b.ToTable("Workspaces", (string)null); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Workspaces.Data.WorkspaceInvite", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid"); - - b.Property("CreatedAt") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp with time zone") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Email") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("InvitedByUserId") - .HasColumnType("uuid"); - - b.Property("Role") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)"); - - b.Property("WorkspaceId") - .HasColumnType("uuid"); - - b.HasKey("Id"); - - b.HasIndex("WorkspaceId"); - - b.HasIndex("WorkspaceId", "Email", "Status"); - - b.ToTable("WorkspaceInvites", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("Socialize.Api.Modules.Identity.Data.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackActivityEntry", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("ActivityEntries") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackComment", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("Comments") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithOne("Screenshot") - .HasForeignKey("Socialize.Api.Modules.Feedback.Data.FeedbackScreenshot", "FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackTag", b => - { - b.HasOne("Socialize.Api.Modules.Feedback.Data.FeedbackReport", "FeedbackReport") - .WithMany("Tags") - .HasForeignKey("FeedbackReportId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("FeedbackReport"); - }); - - modelBuilder.Entity("Socialize.Api.Modules.Feedback.Data.FeedbackReport", b => - { - b.Navigation("ActivityEntries"); - - b.Navigation("Comments"); - - b.Navigation("Screenshot"); - - b.Navigation("Tags"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260501191447_RenameProjectsToCampaigns.cs b/backend/src/Socialize.Api/Migrations/20260501191447_RenameProjectsToCampaigns.cs deleted file mode 100644 index b9e0912..0000000 --- a/backend/src/Socialize.Api/Migrations/20260501191447_RenameProjectsToCampaigns.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - /// - public partial class RenameProjectsToCampaigns : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameTable( - name: "Projects", - newName: "Campaigns"); - - migrationBuilder.DropPrimaryKey( - name: "PK_Projects", - table: "Campaigns"); - - migrationBuilder.AddPrimaryKey( - name: "PK_Campaigns", - table: "Campaigns", - column: "Id"); - - migrationBuilder.RenameIndex( - name: "IX_Projects_WorkspaceId", - table: "Campaigns", - newName: "IX_Campaigns_WorkspaceId"); - - migrationBuilder.RenameIndex( - name: "IX_Projects_ClientId_Name", - table: "Campaigns", - newName: "IX_Campaigns_ClientId_Name"); - - migrationBuilder.RenameIndex( - name: "IX_Projects_ClientId", - table: "Campaigns", - newName: "IX_Campaigns_ClientId"); - - migrationBuilder.RenameColumn( - name: "ProjectName", - table: "FeedbackReports", - newName: "CampaignName"); - - migrationBuilder.RenameColumn( - name: "ProjectId", - table: "FeedbackReports", - newName: "CampaignId"); - - migrationBuilder.RenameColumn( - name: "ProjectId", - table: "ContentItems", - newName: "CampaignId"); - - migrationBuilder.RenameIndex( - name: "IX_ContentItems_ProjectId", - table: "ContentItems", - newName: "IX_ContentItems_CampaignId"); - - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropPrimaryKey( - name: "PK_Campaigns", - table: "Campaigns"); - - migrationBuilder.AddPrimaryKey( - name: "PK_Projects", - table: "Campaigns", - column: "Id"); - - migrationBuilder.RenameIndex( - name: "IX_Campaigns_WorkspaceId", - table: "Campaigns", - newName: "IX_Projects_WorkspaceId"); - - migrationBuilder.RenameIndex( - name: "IX_Campaigns_ClientId_Name", - table: "Campaigns", - newName: "IX_Projects_ClientId_Name"); - - migrationBuilder.RenameIndex( - name: "IX_Campaigns_ClientId", - table: "Campaigns", - newName: "IX_Projects_ClientId"); - - migrationBuilder.RenameTable( - name: "Campaigns", - newName: "Projects"); - - migrationBuilder.RenameColumn( - name: "CampaignName", - table: "FeedbackReports", - newName: "ProjectName"); - - migrationBuilder.RenameColumn( - name: "CampaignId", - table: "FeedbackReports", - newName: "ProjectId"); - - migrationBuilder.RenameColumn( - name: "CampaignId", - table: "ContentItems", - newName: "ProjectId"); - - migrationBuilder.RenameIndex( - name: "IX_ContentItems_CampaignId", - table: "ContentItems", - newName: "IX_ContentItems_ProjectId"); - - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260504195518_AddOrganizations.cs b/backend/src/Socialize.Api/Migrations/20260504195518_AddOrganizations.cs deleted file mode 100644 index deb5dd1..0000000 --- a/backend/src/Socialize.Api/Migrations/20260504195518_AddOrganizations.cs +++ /dev/null @@ -1,126 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Socialize.Api.Migrations -{ - /// - public partial class AddOrganizations : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "OrganizationId", - table: "Workspaces", - type: "uuid", - nullable: false, - defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); - - migrationBuilder.CreateTable( - name: "Organizations", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - OwnerUserId = table.Column(type: "uuid", nullable: false), - CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PK_Organizations", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "OrganizationMemberships", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - OrganizationId = table.Column(type: "uuid", nullable: false), - UserId = table.Column(type: "uuid", nullable: false), - Role = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), - CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PK_OrganizationMemberships", x => x.Id); - table.ForeignKey( - name: "FK_OrganizationMemberships_Organizations_OrganizationId", - column: x => x.OrganizationId, - principalTable: "Organizations", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.Sql( - """ - INSERT INTO "Organizations" ("Id", "Name", "OwnerUserId", "CreatedAt") - VALUES ('99999999-9999-9999-9999-999999999999', 'Northstar Collective', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', CURRENT_TIMESTAMP); - - UPDATE "Workspaces" - SET "OrganizationId" = '99999999-9999-9999-9999-999999999999' - WHERE "OrganizationId" = '00000000-0000-0000-0000-000000000000'; - - INSERT INTO "OrganizationMemberships" ("Id", "OrganizationId", "UserId", "Role", "CreatedAt") - VALUES ('99999999-9999-9999-9999-000000000001', '99999999-9999-9999-9999-999999999999', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'Owner', CURRENT_TIMESTAMP); - """); - - migrationBuilder.CreateIndex( - name: "IX_Workspaces_OrganizationId", - table: "Workspaces", - column: "OrganizationId"); - - migrationBuilder.CreateIndex( - name: "IX_OrganizationMemberships_OrganizationId", - table: "OrganizationMemberships", - column: "OrganizationId"); - - migrationBuilder.CreateIndex( - name: "IX_OrganizationMemberships_OrganizationId_UserId", - table: "OrganizationMemberships", - columns: new[] { "OrganizationId", "UserId" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_OrganizationMemberships_UserId", - table: "OrganizationMemberships", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_Organizations_OwnerUserId", - table: "Organizations", - column: "OwnerUserId"); - - migrationBuilder.AddForeignKey( - name: "FK_Workspaces_Organizations_OrganizationId", - table: "Workspaces", - column: "OrganizationId", - principalTable: "Organizations", - principalColumn: "Id", - onDelete: ReferentialAction.Restrict); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_Workspaces_Organizations_OrganizationId", - table: "Workspaces"); - - migrationBuilder.DropTable( - name: "OrganizationMemberships"); - - migrationBuilder.DropTable( - name: "Organizations"); - - migrationBuilder.DropIndex( - name: "IX_Workspaces_OrganizationId", - table: "Workspaces"); - - migrationBuilder.DropColumn( - name: "OrganizationId", - table: "Workspaces"); - } - } -} diff --git a/backend/src/Socialize.Api/Migrations/20260504195518_AddOrganizations.Designer.cs b/backend/src/Socialize.Api/Migrations/20260505013232_Initial.Designer.cs similarity index 99% rename from backend/src/Socialize.Api/Migrations/20260504195518_AddOrganizations.Designer.cs rename to backend/src/Socialize.Api/Migrations/20260505013232_Initial.Designer.cs index fc0c652..cf42168 100644 --- a/backend/src/Socialize.Api/Migrations/20260504195518_AddOrganizations.Designer.cs +++ b/backend/src/Socialize.Api/Migrations/20260505013232_Initial.Designer.cs @@ -12,8 +12,8 @@ using Socialize.Api.Data; namespace Socialize.Api.Migrations { [DbContext(typeof(AppDbContext))] - [Migration("20260504195518_AddOrganizations")] - partial class AddOrganizations + [Migration("20260505013232_Initial")] + partial class Initial { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -1314,11 +1314,6 @@ namespace Socialize.Api.Migrations .HasColumnType("boolean") .HasDefaultValue(false); - b.Property("Slug") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - b.Property("TimeZone") .IsRequired() .HasMaxLength(128) @@ -1330,9 +1325,6 @@ namespace Socialize.Api.Migrations b.HasIndex("OwnerUserId"); - b.HasIndex("Slug") - .IsUnique(); - b.ToTable("Workspaces", (string)null); }); diff --git a/backend/src/Socialize.Api/Migrations/20260423061407_Initial.cs b/backend/src/Socialize.Api/Migrations/20260505013232_Initial.cs similarity index 61% rename from backend/src/Socialize.Api/Migrations/20260423061407_Initial.cs rename to backend/src/Socialize.Api/Migrations/20260505013232_Initial.cs index 9d522f9..afca074 100644 --- a/backend/src/Socialize.Api/Migrations/20260423061407_Initial.cs +++ b/backend/src/Socialize.Api/Migrations/20260505013232_Initial.cs @@ -37,6 +37,11 @@ namespace Socialize.Api.Migrations Id = table.Column(type: "uuid", nullable: false), WorkspaceId = table.Column(type: "uuid", nullable: false), ContentItemId = table.Column(type: "uuid", nullable: false), + WorkflowInstanceId = table.Column(type: "uuid", nullable: true), + WorkflowStepSortOrder = table.Column(type: "integer", nullable: true), + WorkflowStepTargetType = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), + WorkflowStepTargetValue = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + WorkflowStepRequiredApproverCount = table.Column(type: "integer", nullable: true), Stage = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), ReviewerName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), ReviewerEmail = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), @@ -52,6 +57,23 @@ namespace Socialize.Api.Migrations table.PrimaryKey("PK_ApprovalRequests", x => x.Id); }); + migrationBuilder.CreateTable( + name: "ApprovalWorkflowInstances", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + WorkspaceId = table.Column(type: "uuid", nullable: false), + ContentItemId = table.Column(type: "uuid", nullable: false), + State = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + ApprovalMode = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + StartedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), + CompletedAt = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ApprovalWorkflowInstances", x => x.Id); + }); + migrationBuilder.CreateTable( name: "AspNetRoles", columns: table => new @@ -140,6 +162,26 @@ namespace Socialize.Api.Migrations table.PrimaryKey("PK_Assets", x => x.Id); }); + migrationBuilder.CreateTable( + name: "Campaigns", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + WorkspaceId = table.Column(type: "uuid", nullable: false), + ClientId = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + Description = table.Column(type: "character varying(4000)", maxLength: 4000, nullable: true), + Notes = table.Column(type: "character varying(4000)", maxLength: 4000, nullable: true), + Status = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + StartDate = table.Column(type: "timestamp with time zone", nullable: false), + EndDate = table.Column(type: "timestamp with time zone", nullable: false), + CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("PK_Campaigns", x => x.Id); + }); + migrationBuilder.CreateTable( name: "Clients", columns: table => new @@ -208,7 +250,7 @@ namespace Socialize.Api.Migrations Id = table.Column(type: "uuid", nullable: false), WorkspaceId = table.Column(type: "uuid", nullable: false), ClientId = table.Column(type: "uuid", nullable: false), - ProjectId = table.Column(type: "uuid", nullable: false), + CampaignId = table.Column(type: "uuid", nullable: false), Title = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), PublicationMessage = table.Column(type: "character varying(4000)", maxLength: 4000, nullable: false), PublicationTargets = table.Column(type: "character varying(512)", maxLength: 512, nullable: false), @@ -224,6 +266,41 @@ namespace Socialize.Api.Migrations table.PrimaryKey("PK_ContentItems", x => x.Id); }); + migrationBuilder.CreateTable( + name: "FeedbackReports", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Type = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), + Status = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), + Description = table.Column(type: "character varying(8000)", maxLength: 8000, nullable: false), + ReporterUserId = table.Column(type: "uuid", nullable: false), + ReporterDisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + ReporterEmail = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + SubmittedPath = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: false), + BrowserUserAgent = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), + ViewportWidth = table.Column(type: "integer", nullable: true), + ViewportHeight = table.Column(type: "integer", nullable: true), + AppVersion = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + WorkspaceId = table.Column(type: "uuid", nullable: true), + WorkspaceName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + ClientId = table.Column(type: "uuid", nullable: true), + ClientName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + CampaignId = table.Column(type: "uuid", nullable: true), + CampaignName = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + ContentItemId = table.Column(type: "uuid", nullable: true), + ContentItemTitle = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), + LastActivityAt = table.Column(type: "timestamp with time zone", nullable: false), + CancelledAt = table.Column(type: "timestamp with time zone", nullable: true), + CancelledByUserId = table.Column(type: "uuid", nullable: true), + CancellationReason = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_FeedbackReports", x => x.Id); + }); + migrationBuilder.CreateTable( name: "NotificationEvents", columns: table => new @@ -247,23 +324,35 @@ namespace Socialize.Api.Migrations }); migrationBuilder.CreateTable( - name: "Projects", + name: "Organizations", columns: table => new { Id = table.Column(type: "uuid", nullable: false), - WorkspaceId = table.Column(type: "uuid", nullable: false), - ClientId = table.Column(type: "uuid", nullable: false), Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - Description = table.Column(type: "character varying(4000)", maxLength: 4000, nullable: true), - Notes = table.Column(type: "character varying(4000)", maxLength: 4000, nullable: true), - Status = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), - StartDate = table.Column(type: "timestamp with time zone", nullable: false), - EndDate = table.Column(type: "timestamp with time zone", nullable: false), + OwnerUserId = table.Column(type: "uuid", nullable: false), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") }, constraints: table => { - table.PrimaryKey("PK_Projects", x => x.Id); + table.PrimaryKey("PK_Organizations", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "WorkspaceApprovalStepConfigurations", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + WorkspaceId = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + SortOrder = table.Column(type: "integer", nullable: false), + TargetType = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), + TargetValue = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + RequiredApproverCount = table.Column(type: "integer", nullable: false, defaultValue: 1), + CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("PK_WorkspaceApprovalStepConfigurations", x => x.Id); }); migrationBuilder.CreateTable( @@ -283,22 +372,6 @@ namespace Socialize.Api.Migrations table.PrimaryKey("PK_WorkspaceInvites", x => x.Id); }); - migrationBuilder.CreateTable( - name: "Workspaces", - columns: table => new - { - Id = table.Column(type: "uuid", nullable: false), - Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), - Slug = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - OwnerUserId = table.Column(type: "uuid", nullable: false), - TimeZone = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PK_Workspaces", x => x.Id); - }); - migrationBuilder.CreateTable( name: "AspNetRoleClaims", columns: table => new @@ -405,6 +478,148 @@ namespace Socialize.Api.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "FeedbackActivityEntries", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + FeedbackReportId = table.Column(type: "uuid", nullable: false), + ActorUserId = table.Column(type: "uuid", nullable: false), + ActorDisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + ActorEmail = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + ActivityType = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + FromValue = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + ToValue = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + Note = table.Column(type: "character varying(2000)", maxLength: 2000, nullable: true), + CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("PK_FeedbackActivityEntries", x => x.Id); + table.ForeignKey( + name: "FK_FeedbackActivityEntries_FeedbackReports_FeedbackReportId", + column: x => x.FeedbackReportId, + principalTable: "FeedbackReports", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "FeedbackComments", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + FeedbackReportId = table.Column(type: "uuid", nullable: false), + AuthorUserId = table.Column(type: "uuid", nullable: false), + AuthorDisplayName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + AuthorEmail = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + AuthorRole = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), + Body = table.Column(type: "character varying(8000)", maxLength: 8000, nullable: false), + CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("PK_FeedbackComments", x => x.Id); + table.ForeignKey( + name: "FK_FeedbackComments_FeedbackReports_FeedbackReportId", + column: x => x.FeedbackReportId, + principalTable: "FeedbackReports", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "FeedbackScreenshots", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + FeedbackReportId = table.Column(type: "uuid", nullable: false), + FileName = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + ContentType = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + SizeBytes = table.Column(type: "bigint", nullable: false), + BlobContainerName = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + BlobName = table.Column(type: "character varying(512)", maxLength: 512, nullable: false), + CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("PK_FeedbackScreenshots", x => x.Id); + table.ForeignKey( + name: "FK_FeedbackScreenshots_FeedbackReports_FeedbackReportId", + column: x => x.FeedbackReportId, + principalTable: "FeedbackReports", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "FeedbackTags", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + FeedbackReportId = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + NormalizedName = table.Column(type: "character varying(64)", maxLength: 64, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_FeedbackTags", x => x.Id); + table.ForeignKey( + name: "FK_FeedbackTags_FeedbackReports_FeedbackReportId", + column: x => x.FeedbackReportId, + principalTable: "FeedbackReports", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "OrganizationMemberships", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + OrganizationId = table.Column(type: "uuid", nullable: false), + UserId = table.Column(type: "uuid", nullable: false), + Role = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("PK_OrganizationMemberships", x => x.Id); + table.ForeignKey( + name: "FK_OrganizationMemberships_Organizations_OrganizationId", + column: x => x.OrganizationId, + principalTable: "Organizations", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "Workspaces", + columns: table => new + { + Id = table.Column(type: "uuid", nullable: false), + Name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), + LogoUrl = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: true), + OrganizationId = table.Column(type: "uuid", nullable: false), + OwnerUserId = table.Column(type: "uuid", nullable: false), + TimeZone = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + ApprovalMode = table.Column(type: "character varying(32)", maxLength: 32, nullable: false, defaultValue: "Required"), + SchedulePostsAutomaticallyOnApproval = table.Column(type: "boolean", nullable: false, defaultValue: false), + LockContentAfterApproval = table.Column(type: "boolean", nullable: false, defaultValue: false), + SendAutomaticApprovalReminders = table.Column(type: "boolean", nullable: false, defaultValue: false), + CreatedAt = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("PK_Workspaces", x => x.Id); + table.ForeignKey( + name: "FK_Workspaces_Organizations_OrganizationId", + column: x => x.OrganizationId, + principalTable: "Organizations", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + migrationBuilder.CreateIndex( name: "IX_ApprovalDecisions_ApprovalRequestId", table: "ApprovalDecisions", @@ -420,11 +635,33 @@ namespace Socialize.Api.Migrations table: "ApprovalRequests", column: "ReviewerEmail"); + migrationBuilder.CreateIndex( + name: "IX_ApprovalRequests_WorkflowInstanceId", + table: "ApprovalRequests", + column: "WorkflowInstanceId"); + migrationBuilder.CreateIndex( name: "IX_ApprovalRequests_WorkspaceId", table: "ApprovalRequests", column: "WorkspaceId"); + migrationBuilder.CreateIndex( + name: "IX_ApprovalWorkflowInstances_ContentItemId", + table: "ApprovalWorkflowInstances", + column: "ContentItemId"); + + migrationBuilder.CreateIndex( + name: "IX_ApprovalWorkflowInstances_ContentItemId_State", + table: "ApprovalWorkflowInstances", + columns: new[] { "ContentItemId", "State" }, + unique: true, + filter: "\"State\" = 'Pending'"); + + migrationBuilder.CreateIndex( + name: "IX_ApprovalWorkflowInstances_WorkspaceId", + table: "ApprovalWorkflowInstances", + column: "WorkspaceId"); + migrationBuilder.CreateIndex( name: "IX_AspNetRoleClaims_RoleId", table: "AspNetRoleClaims", @@ -483,6 +720,22 @@ namespace Socialize.Api.Migrations table: "Assets", column: "WorkspaceId"); + migrationBuilder.CreateIndex( + name: "IX_Campaigns_ClientId", + table: "Campaigns", + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_Campaigns_ClientId_Name", + table: "Campaigns", + columns: new[] { "ClientId", "Name" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Campaigns_WorkspaceId", + table: "Campaigns", + column: "WorkspaceId"); + migrationBuilder.CreateIndex( name: "IX_Clients_WorkspaceId", table: "Clients", @@ -520,21 +773,93 @@ namespace Socialize.Api.Migrations columns: new[] { "ContentItemId", "RevisionNumber" }, unique: true); + migrationBuilder.CreateIndex( + name: "IX_ContentItems_CampaignId", + table: "ContentItems", + column: "CampaignId"); + migrationBuilder.CreateIndex( name: "IX_ContentItems_ClientId", table: "ContentItems", column: "ClientId"); - migrationBuilder.CreateIndex( - name: "IX_ContentItems_ProjectId", - table: "ContentItems", - column: "ProjectId"); - migrationBuilder.CreateIndex( name: "IX_ContentItems_WorkspaceId", table: "ContentItems", column: "WorkspaceId"); + migrationBuilder.CreateIndex( + name: "IX_FeedbackActivityEntries_ActorUserId", + table: "FeedbackActivityEntries", + column: "ActorUserId"); + + migrationBuilder.CreateIndex( + name: "IX_FeedbackActivityEntries_CreatedAt", + table: "FeedbackActivityEntries", + column: "CreatedAt"); + + migrationBuilder.CreateIndex( + name: "IX_FeedbackActivityEntries_FeedbackReportId", + table: "FeedbackActivityEntries", + column: "FeedbackReportId"); + + migrationBuilder.CreateIndex( + name: "IX_FeedbackComments_AuthorUserId", + table: "FeedbackComments", + column: "AuthorUserId"); + + migrationBuilder.CreateIndex( + name: "IX_FeedbackComments_CreatedAt", + table: "FeedbackComments", + column: "CreatedAt"); + + migrationBuilder.CreateIndex( + name: "IX_FeedbackComments_FeedbackReportId", + table: "FeedbackComments", + column: "FeedbackReportId"); + + migrationBuilder.CreateIndex( + name: "IX_FeedbackReports_LastActivityAt", + table: "FeedbackReports", + column: "LastActivityAt"); + + migrationBuilder.CreateIndex( + name: "IX_FeedbackReports_ReporterUserId", + table: "FeedbackReports", + column: "ReporterUserId"); + + migrationBuilder.CreateIndex( + name: "IX_FeedbackReports_Status", + table: "FeedbackReports", + column: "Status"); + + migrationBuilder.CreateIndex( + name: "IX_FeedbackReports_Type", + table: "FeedbackReports", + column: "Type"); + + migrationBuilder.CreateIndex( + name: "IX_FeedbackReports_WorkspaceId", + table: "FeedbackReports", + column: "WorkspaceId"); + + migrationBuilder.CreateIndex( + name: "IX_FeedbackScreenshots_FeedbackReportId", + table: "FeedbackScreenshots", + column: "FeedbackReportId", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_FeedbackTags_FeedbackReportId_NormalizedName", + table: "FeedbackTags", + columns: new[] { "FeedbackReportId", "NormalizedName" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_FeedbackTags_NormalizedName", + table: "FeedbackTags", + column: "NormalizedName"); + migrationBuilder.CreateIndex( name: "IX_NotificationEvents_ContentItemId", table: "NotificationEvents", @@ -556,21 +881,37 @@ namespace Socialize.Api.Migrations column: "WorkspaceId"); migrationBuilder.CreateIndex( - name: "IX_Projects_ClientId", - table: "Projects", - column: "ClientId"); + name: "IX_OrganizationMemberships_OrganizationId", + table: "OrganizationMemberships", + column: "OrganizationId"); migrationBuilder.CreateIndex( - name: "IX_Projects_ClientId_Name", - table: "Projects", - columns: new[] { "ClientId", "Name" }, + name: "IX_OrganizationMemberships_OrganizationId_UserId", + table: "OrganizationMemberships", + columns: new[] { "OrganizationId", "UserId" }, unique: true); migrationBuilder.CreateIndex( - name: "IX_Projects_WorkspaceId", - table: "Projects", + name: "IX_OrganizationMemberships_UserId", + table: "OrganizationMemberships", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_Organizations_OwnerUserId", + table: "Organizations", + column: "OwnerUserId"); + + migrationBuilder.CreateIndex( + name: "IX_WorkspaceApprovalStepConfigurations_WorkspaceId", + table: "WorkspaceApprovalStepConfigurations", column: "WorkspaceId"); + migrationBuilder.CreateIndex( + name: "IX_WorkspaceApprovalStepConfigurations_WorkspaceId_SortOrder", + table: "WorkspaceApprovalStepConfigurations", + columns: new[] { "WorkspaceId", "SortOrder" }, + unique: true); + migrationBuilder.CreateIndex( name: "IX_WorkspaceInvites_WorkspaceId", table: "WorkspaceInvites", @@ -581,16 +922,15 @@ namespace Socialize.Api.Migrations table: "WorkspaceInvites", columns: new[] { "WorkspaceId", "Email", "Status" }); + migrationBuilder.CreateIndex( + name: "IX_Workspaces_OrganizationId", + table: "Workspaces", + column: "OrganizationId"); + migrationBuilder.CreateIndex( name: "IX_Workspaces_OwnerUserId", table: "Workspaces", column: "OwnerUserId"); - - migrationBuilder.CreateIndex( - name: "IX_Workspaces_Slug", - table: "Workspaces", - column: "Slug", - unique: true); } /// @@ -602,6 +942,9 @@ namespace Socialize.Api.Migrations migrationBuilder.DropTable( name: "ApprovalRequests"); + migrationBuilder.DropTable( + name: "ApprovalWorkflowInstances"); + migrationBuilder.DropTable( name: "AspNetRoleClaims"); @@ -623,6 +966,9 @@ namespace Socialize.Api.Migrations migrationBuilder.DropTable( name: "Assets"); + migrationBuilder.DropTable( + name: "Campaigns"); + migrationBuilder.DropTable( name: "Clients"); @@ -635,11 +981,26 @@ namespace Socialize.Api.Migrations migrationBuilder.DropTable( name: "ContentItems"); + migrationBuilder.DropTable( + name: "FeedbackActivityEntries"); + + migrationBuilder.DropTable( + name: "FeedbackComments"); + + migrationBuilder.DropTable( + name: "FeedbackScreenshots"); + + migrationBuilder.DropTable( + name: "FeedbackTags"); + migrationBuilder.DropTable( name: "NotificationEvents"); migrationBuilder.DropTable( - name: "Projects"); + name: "OrganizationMemberships"); + + migrationBuilder.DropTable( + name: "WorkspaceApprovalStepConfigurations"); migrationBuilder.DropTable( name: "WorkspaceInvites"); @@ -652,6 +1013,12 @@ namespace Socialize.Api.Migrations migrationBuilder.DropTable( name: "AspNetUsers"); + + migrationBuilder.DropTable( + name: "FeedbackReports"); + + migrationBuilder.DropTable( + name: "Organizations"); } } } diff --git a/backend/src/Socialize.Api/Migrations/AppDbContextModelSnapshot.cs b/backend/src/Socialize.Api/Migrations/AppDbContextModelSnapshot.cs index 1633138..cfbf94f 100644 --- a/backend/src/Socialize.Api/Migrations/AppDbContextModelSnapshot.cs +++ b/backend/src/Socialize.Api/Migrations/AppDbContextModelSnapshot.cs @@ -1311,11 +1311,6 @@ namespace Socialize.Api.Migrations .HasColumnType("boolean") .HasDefaultValue(false); - b.Property("Slug") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)"); - b.Property("TimeZone") .IsRequired() .HasMaxLength(128) @@ -1327,9 +1322,6 @@ namespace Socialize.Api.Migrations b.HasIndex("OwnerUserId"); - b.HasIndex("Slug") - .IsUnique(); - b.ToTable("Workspaces", (string)null); }); diff --git a/backend/src/Socialize.Api/Modules/Workspaces/Data/Workspace.cs b/backend/src/Socialize.Api/Modules/Workspaces/Data/Workspace.cs index 6bc8f6f..d72bdaf 100644 --- a/backend/src/Socialize.Api/Modules/Workspaces/Data/Workspace.cs +++ b/backend/src/Socialize.Api/Modules/Workspaces/Data/Workspace.cs @@ -4,7 +4,6 @@ public class Workspace { public Guid Id { get; init; } public required string Name { get; set; } - public required string Slug { get; set; } public string? LogoUrl { get; set; } public Guid OrganizationId { get; set; } public Guid OwnerUserId { get; set; } diff --git a/backend/src/Socialize.Api/Modules/Workspaces/Data/WorkspaceModelConfiguration.cs b/backend/src/Socialize.Api/Modules/Workspaces/Data/WorkspaceModelConfiguration.cs index 8bcf726..7f24391 100644 --- a/backend/src/Socialize.Api/Modules/Workspaces/Data/WorkspaceModelConfiguration.cs +++ b/backend/src/Socialize.Api/Modules/Workspaces/Data/WorkspaceModelConfiguration.cs @@ -12,7 +12,6 @@ public static class WorkspaceModelConfiguration workspace.ToTable("Workspaces"); workspace.HasKey(x => x.Id); workspace.Property(x => x.Name).HasMaxLength(256).IsRequired(); - workspace.Property(x => x.Slug).HasMaxLength(128).IsRequired(); workspace.Property(x => x.LogoUrl).HasMaxLength(2048); workspace.Property(x => x.TimeZone).HasMaxLength(128).IsRequired(); workspace.Property(x => x.ApprovalMode).HasMaxLength(32).IsRequired().HasDefaultValue("Required"); @@ -22,7 +21,6 @@ public static class WorkspaceModelConfiguration workspace.Property(x => x.CreatedAt) .ValueGeneratedOnAdd() .HasDefaultValueSql("CURRENT_TIMESTAMP"); - workspace.HasIndex(x => x.Slug).IsUnique(); workspace.HasIndex(x => x.OrganizationId); workspace.HasIndex(x => x.OwnerUserId); workspace.HasOne() diff --git a/backend/src/Socialize.Api/Modules/Workspaces/Handlers/CreateWorkspace.cs b/backend/src/Socialize.Api/Modules/Workspaces/Handlers/CreateWorkspace.cs index 4549112..b6e311f 100644 --- a/backend/src/Socialize.Api/Modules/Workspaces/Handlers/CreateWorkspace.cs +++ b/backend/src/Socialize.Api/Modules/Workspaces/Handlers/CreateWorkspace.cs @@ -9,7 +9,6 @@ namespace Socialize.Api.Modules.Workspaces.Handlers; public record CreateWorkspaceRequest( Guid OrganizationId, string Name, - string Slug, string TimeZone); public class CreateWorkspaceRequestValidator @@ -19,10 +18,6 @@ public class CreateWorkspaceRequestValidator { RuleFor(x => x.OrganizationId).NotEmpty(); RuleFor(x => x.Name).NotEmpty().MaximumLength(256); - RuleFor(x => x.Slug) - .NotEmpty() - .MaximumLength(128) - .Matches("^[a-z0-9]+(?:-[a-z0-9]+)*$"); RuleFor(x => x.TimeZone).NotEmpty().MaximumLength(128); } } @@ -56,25 +51,13 @@ public class CreateWorkspaceHandler( } string normalizedName = request.Name.Trim(); - string normalizedSlug = request.Slug.Trim().ToLowerInvariant(); string normalizedTimeZone = request.TimeZone.Trim(); - bool duplicateWorkspace = await dbContext.Workspaces - .AnyAsync(workspace => workspace.Slug == normalizedSlug, ct); - - if (duplicateWorkspace) - { - AddError(request => request.Slug, "A workspace with this slug already exists."); - await SendErrorsAsync(StatusCodes.Status409Conflict, ct); - return; - } - Workspace workspace = new() { Id = Guid.NewGuid(), OrganizationId = request.OrganizationId, Name = normalizedName, - Slug = normalizedSlug, OwnerUserId = User.GetUserId(), TimeZone = normalizedTimeZone, CreatedAt = DateTimeOffset.UtcNow, diff --git a/backend/src/Socialize.Api/Modules/Workspaces/Handlers/GetWorkspaces.cs b/backend/src/Socialize.Api/Modules/Workspaces/Handlers/GetWorkspaces.cs index 4681c71..03ee9fd 100644 --- a/backend/src/Socialize.Api/Modules/Workspaces/Handlers/GetWorkspaces.cs +++ b/backend/src/Socialize.Api/Modules/Workspaces/Handlers/GetWorkspaces.cs @@ -21,7 +21,6 @@ public record WorkspaceDto( Guid Id, Guid OrganizationId, string Name, - string Slug, string? LogoUrl, string TimeZone, string ApprovalMode, @@ -39,7 +38,6 @@ public record WorkspaceDto( workspace.Id, workspace.OrganizationId, workspace.Name, - workspace.Slug, workspace.LogoUrl, workspace.TimeZone, workspace.ApprovalMode, diff --git a/docs/TASKS/content/001-merge-calendar-and-content-views.md b/docs/TASKS/content/001-merge-calendar-and-content-views.md new file mode 100644 index 0000000..4bec9c3 --- /dev/null +++ b/docs/TASKS/content/001-merge-calendar-and-content-views.md @@ -0,0 +1,27 @@ +# Task: Merge content calendar and list navigation + +## Goal + +Expose calendar and content list workflows from a single Content sidebar entry. + +## Scope + +- Keep one sidebar item named Content using the calendar icon. +- Route the old workspace calendar entry to the Content page. +- Add Month, Week, and Upcoming views to the Content page. +- Remove in-view new content buttons because the app bar already exposes creation. + +## Relevant Files + +- `frontend/src/layouts/main/AppSidebar.vue` +- `frontend/src/router/router.js` +- `frontend/src/features/content/views/ContentItemsView.vue` +- `frontend/src/locales/en.json` +- `frontend/src/locales/fr.json` + +## Validation + +```bash +cd frontend +npm run build +``` diff --git a/docs/TASKS/organizations/005-remove-workspace-url-key.md b/docs/TASKS/organizations/005-remove-workspace-url-key.md new file mode 100644 index 0000000..72eb338 --- /dev/null +++ b/docs/TASKS/organizations/005-remove-workspace-url-key.md @@ -0,0 +1,46 @@ +# Task: Remove workspace URL key + +## Feature + +`docs/FEATURES/organizations.md` + +## Goal + +Remove the human-managed workspace URL key from the product, API, database model, frontend UI, and generated contracts. + +## Context + +Workspaces are selected and routed by stable identifiers. The create workspace page still exposes a manual URL key field and the backend still persists a dedicated column for it. + +## Scope + +- Remove the URL key from workspace persistence and model configuration. +- Remove the URL key from workspace create requests and workspace DTO responses. +- Remove URL key validation and duplicate checks from workspace creation. +- Remove URL key UI, preview copy, and locale strings from the new-workspace page. +- Remove URL key display from organization workspace lists. +- Update generated OpenAPI/schema artifacts after the backend contract change. +- Rename any frontend-only helper that is not actually a product URL key. + +## Constraints + +- Keep workspace ownership under organizations intact. +- Do not redesign workspace creation beyond removing the URL key UI. +- Preserve existing workspace/channel behavior except for deleting the workspace URL key. + +## Done When + +- [x] Workspace creation no longer accepts or sends the URL key. +- [x] Workspace responses no longer include the URL key. +- [x] The current EF model no longer contains the workspace URL key column or index. +- [x] The new-workspace page no longer references the URL key. +- [x] OpenAPI and frontend schema artifacts are regenerated. + +## Validation Commands + +```bash +dotnet build backend/Socialize.slnx +dotnet test backend/Socialize.slnx +cd frontend +npm run build +``` diff --git a/frontend/src/App.vue b/frontend/src/App.vue index cfdd3f4..d96724c 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -85,7 +85,7 @@ } .sidebar-boundary-toggle { - @apply absolute left-full top-8 z-40 flex h-10 w-10 -translate-x-1/2 items-center justify-center rounded-full border transition-colors; + @apply absolute left-full top-[1.48rem] z-40 flex h-[1.8rem] w-[1.8rem] -translate-x-1/2 items-center justify-center rounded-full border transition-colors; background: rgba(255, 250, 242, 0.98); border-color: rgba(23, 32, 51, 0.12); color: #44516a; @@ -97,6 +97,10 @@ color: #fffaf2; } + .sidebar-boundary-toggle :deep(.v-icon) { + font-size: 1rem; + } + .shell-view { @apply flex min-w-0 flex-1; } diff --git a/frontend/src/api/schema.d.ts b/frontend/src/api/schema.d.ts index 68160da..d1ad288 100644 --- a/frontend/src/api/schema.d.ts +++ b/frontend/src/api/schema.d.ts @@ -913,7 +913,6 @@ export interface components { /** Format: guid */ organizationId?: string; name?: string; - slug?: string; logoUrl?: string | null; timeZone?: string; approvalMode?: string; @@ -943,7 +942,6 @@ export interface components { /** Format: guid */ organizationId: string; name: string; - slug: string; timeZone: string; }; SocializeApiModulesWorkspacesHandlersWorkspaceInviteDto: { diff --git a/frontend/src/entry-public-ssr.js b/frontend/src/entry-public-ssr.js index 547b450..fa07212 100644 --- a/frontend/src/entry-public-ssr.js +++ b/frontend/src/entry-public-ssr.js @@ -3,6 +3,7 @@ import { createMemoryHistory, createRouter, RouterView } from 'vue-router'; import { createHead, renderHeadToString } from '@vueuse/head'; import { renderToString } from '@vue/server-renderer'; import { createI18n } from 'vue-i18n'; +import { createPinia } from 'pinia'; import en from '@/locales/en.json'; import fr from '@/locales/fr.json'; import Landing from '@/features/landing/views/Landing.vue'; @@ -42,6 +43,7 @@ export async function render(routePath) { render: () => h(RouterView), }); + app.use(createPinia()); app.use(router); app.use(head); app.use(i18n); diff --git a/frontend/src/features/auth/views/LoginView.vue b/frontend/src/features/auth/views/LoginView.vue index a3cf655..5e11778 100644 --- a/frontend/src/features/auth/views/LoginView.vue +++ b/frontend/src/features/auth/views/LoginView.vue @@ -145,14 +145,20 @@ const props = defineProps({ returnUrl: { type: String, - default: '/landing', + default: '/app/dashboard', }, }); + function getPostLoginUrl() { + return props.returnUrl?.startsWith('/app') + ? props.returnUrl + : '/app/dashboard'; + } + async function handleLocalLogin() { try { await authStore.login(email.value, password.value); - await router.push(props.returnUrl); + await router.push(getPostLoginUrl()); } catch (error) { console.error('Login failed:', error); errorSnackBar.value = true; @@ -163,7 +169,7 @@ try { const response = await authStore.loginWithGoogle(JSON.stringify(token)); if (response === true) { - await router.push(props.returnUrl); + await router.push(getPostLoginUrl()); } else { errorSnackBar.value = true; } @@ -177,7 +183,7 @@ try { const response = await loginWithFacebook(); if (response === true) { - await router.push(props.returnUrl); + await router.push(getPostLoginUrl()); } else { errorSnackBar.value = true; } diff --git a/frontend/src/features/campaigns/views/CampaignsView.vue b/frontend/src/features/campaigns/views/CampaignsView.vue index 58023e5..c29c81e 100644 --- a/frontend/src/features/campaigns/views/CampaignsView.vue +++ b/frontend/src/features/campaigns/views/CampaignsView.vue @@ -2,13 +2,11 @@ import { computed, reactive, ref, watch } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; - import { useAuthStore } from '@/features/auth/stores/authStore.js'; import { useClientsStore } from '@/features/clients/stores/clientsStore.js'; import { useWorkspaceStore } from '@/features/workspaces/stores/workspaceStore.js'; import { useCampaignsStore } from '@/features/campaigns/stores/campaignsStore.js'; const route = useRoute(); - const authStore = useAuthStore(); const workspaceStore = useWorkspaceStore(); const clientsStore = useClientsStore(); const campaignsStore = useCampaignsStore(); @@ -114,16 +112,6 @@ -
- -
-
{ for (const item of contentItemsStore.items) { for (const name of parseTargets(item.publicationTargets)) { - const key = slugify(name); + const key = normalizeChannelKey(name); const existing = derivedChannels.get(key) ?? { id: key, name, @@ -95,7 +95,7 @@ export const useChannelsStore = defineStore('channels', () => { [currentWorkspaceId]: [ ...next, { - id: slugify(`${normalizedNetwork}-${normalizedName}`), + id: normalizeChannelKey(`${normalizedNetwork}-${normalizedName}`), name: normalizedName, network: normalizedNetwork, }, @@ -110,7 +110,7 @@ export const useChannelsStore = defineStore('channels', () => { .filter(Boolean); } - function slugify(value) { + function normalizeChannelKey(value) { return value.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, ''); } diff --git a/frontend/src/features/content/views/ContentItemsView.vue b/frontend/src/features/content/views/ContentItemsView.vue index c2fdb8d..a398759 100644 --- a/frontend/src/features/content/views/ContentItemsView.vue +++ b/frontend/src/features/content/views/ContentItemsView.vue @@ -1,11 +1,280 @@ + + diff --git a/frontend/src/layouts/main/WorkspaceSelector.vue b/frontend/src/layouts/main/WorkspaceSelector.vue index a9fb399..5f2fcb0 100644 --- a/frontend/src/layouts/main/WorkspaceSelector.vue +++ b/frontend/src/layouts/main/WorkspaceSelector.vue @@ -93,6 +93,16 @@ await router.push({ name: 'workspace-create' }); } + async function openWorkspaceSettings(workspaceId) { + if (workspaceId) { + workspaceStore.setActiveWorkspace(workspaceId); + } + + isWorkspaceMenuOpen.value = false; + isOrganizationListOpen.value = false; + await router.push({ name: 'workspace-settings' }); + } + async function openOrganizationSettings(organizationId) { isWorkspaceMenuOpen.value = false; isOrganizationListOpen.value = false; @@ -143,23 +153,38 @@ v-if="isWorkspaceMenuOpen" class="user-menu" > - + + + +