// 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 } } }