feat: add database backed membership tiers
This commit is contained in:
@@ -1659,6 +1659,11 @@ namespace Socialize.Api.Migrations
|
||||
.HasMaxLength(2048)
|
||||
.HasColumnType("character varying(2048)");
|
||||
|
||||
b.Property<Guid>("MembershipTierId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid")
|
||||
.HasDefaultValue(new Guid("20000000-0000-0000-0000-000000000001"));
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
@@ -1669,6 +1674,8 @@ namespace Socialize.Api.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("MembershipTierId");
|
||||
|
||||
b.HasIndex("OwnerUserId");
|
||||
|
||||
b.ToTable("Organizations", (string)null);
|
||||
@@ -1708,6 +1715,110 @@ namespace Socialize.Api.Migrations
|
||||
b.ToTable("OrganizationMemberships", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Socialize.Api.Modules.Organizations.Data.OrganizationMembershipTier", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<int?>("ActiveContentLimit")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasMaxLength(512)
|
||||
.HasColumnType("character varying(512)");
|
||||
|
||||
b.Property<int?>("ExternalReviewerLimit")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("IsCustom")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.Property<int?>("MemberLimit")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("MonthlyPriceCents")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("character varying(128)");
|
||||
|
||||
b.Property<int>("SortOrder")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int?>("WorkspaceLimit")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Key")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("SortOrder");
|
||||
|
||||
b.ToTable("OrganizationMembershipTiers", (string)null);
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = new Guid("20000000-0000-0000-0000-000000000001"),
|
||||
ActiveContentLimit = 3,
|
||||
Description = "For trying Socialize on one real approval workflow.",
|
||||
ExternalReviewerLimit = 1,
|
||||
IsCustom = false,
|
||||
Key = "free",
|
||||
MemberLimit = 2,
|
||||
MonthlyPriceCents = 0,
|
||||
Name = "Free",
|
||||
SortOrder = 10,
|
||||
WorkspaceLimit = 1
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = new Guid("20000000-0000-0000-0000-000000000002"),
|
||||
ActiveContentLimit = 25,
|
||||
Description = "For solo operators managing recurring client reviews.",
|
||||
ExternalReviewerLimit = 10,
|
||||
IsCustom = false,
|
||||
Key = "freelance",
|
||||
MemberLimit = 5,
|
||||
MonthlyPriceCents = 1900,
|
||||
Name = "Freelance",
|
||||
SortOrder = 20,
|
||||
WorkspaceLimit = 3
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = new Guid("20000000-0000-0000-0000-000000000003"),
|
||||
ActiveContentLimit = 250,
|
||||
Description = "For agencies that need repeatable client approval operations.",
|
||||
IsCustom = false,
|
||||
Key = "agency",
|
||||
MemberLimit = 25,
|
||||
MonthlyPriceCents = 7900,
|
||||
Name = "Agency",
|
||||
SortOrder = 30,
|
||||
WorkspaceLimit = 15
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = new Guid("20000000-0000-0000-0000-000000000004"),
|
||||
Description = "For larger organizations with governance and access needs.",
|
||||
IsCustom = true,
|
||||
Key = "enterprise",
|
||||
Name = "Enterprise",
|
||||
SortOrder = 40
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Socialize.Api.Modules.Workspaces.Data.Workspace", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@@ -2127,6 +2238,15 @@ namespace Socialize.Api.Migrations
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Socialize.Api.Modules.Organizations.Data.Organization", b =>
|
||||
{
|
||||
b.HasOne("Socialize.Api.Modules.Organizations.Data.OrganizationMembershipTier", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("MembershipTierId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Socialize.Api.Modules.Organizations.Data.OrganizationMembership", b =>
|
||||
{
|
||||
b.HasOne("Socialize.Api.Modules.Organizations.Data.Organization", null)
|
||||
|
||||
Reference in New Issue
Block a user