chore: add missing multi-level editor for approval workflow, rename projects to campaings.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Socialize.Api.Modules.Campaigns.Data;
|
||||
|
||||
public static class CampaignModelConfiguration
|
||||
{
|
||||
public static ModelBuilder ConfigureCampaignsModule(this ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<Campaign>(campaign =>
|
||||
{
|
||||
campaign.ToTable("Campaigns");
|
||||
campaign.HasKey(x => x.Id);
|
||||
campaign.Property(x => x.Name).HasMaxLength(256).IsRequired();
|
||||
campaign.Property(x => x.Description).HasMaxLength(4000);
|
||||
campaign.Property(x => x.Notes).HasMaxLength(4000);
|
||||
campaign.Property(x => x.Status).HasMaxLength(64).IsRequired();
|
||||
campaign.Property(x => x.CreatedAt)
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
||||
campaign.HasIndex(x => new { x.ClientId, x.Name }).IsUnique();
|
||||
campaign.HasIndex(x => x.WorkspaceId);
|
||||
campaign.HasIndex(x => x.ClientId);
|
||||
});
|
||||
|
||||
return modelBuilder;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user