Browse Source

fix build break caused by conflict resolving.

pull/6926/head
Ilkay Ilknur 5 years ago
parent
commit
2192f20df5
  1. 71
      modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs

71
modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/EntityFrameworkCore/CmsKitDbContextModelCreatingExtensions.cs

@ -41,8 +41,8 @@ namespace Volo.CmsKit.EntityFrameworkCore
b.ConfigureByConvention();
b.ConfigureAbpUser();
b.HasIndex(x => new { x.TenantId, x.UserName });
b.HasIndex(x => new { x.TenantId, x.Email });
b.HasIndex(x => new {x.TenantId, x.UserName});
b.HasIndex(x => new {x.TenantId, x.Email});
});
}
@ -58,8 +58,8 @@ namespace Volo.CmsKit.EntityFrameworkCore
b.Property(x => x.EntityId).IsRequired().HasMaxLength(UserReactionConsts.MaxEntityIdLength);
b.Property(x => x.ReactionName).IsRequired().HasMaxLength(UserReactionConsts.MaxReactionNameLength);
b.HasIndex(x => new { x.TenantId, x.EntityType, x.EntityId, x.ReactionName });
b.HasIndex(x => new { x.TenantId, x.CreatorId, x.EntityType, x.EntityId, x.ReactionName });
b.HasIndex(x => new {x.TenantId, x.EntityType, x.EntityId, x.ReactionName});
b.HasIndex(x => new {x.TenantId, x.CreatorId, x.EntityType, x.EntityId, x.ReactionName});
});
}
@ -76,8 +76,8 @@ namespace Volo.CmsKit.EntityFrameworkCore
b.Property(x => x.Text).IsRequired().HasMaxLength(CommentConsts.MaxTextLength);
b.Property(x => x.RepliedCommentId);
b.HasIndex(x => new { x.TenantId, x.EntityType, x.EntityId });
b.HasIndex(x => new { x.TenantId, x.RepliedCommentId });
b.HasIndex(x => new {x.TenantId, x.EntityType, x.EntityId});
b.HasIndex(x => new {x.TenantId, x.RepliedCommentId});
});
}
@ -93,7 +93,7 @@ namespace Volo.CmsKit.EntityFrameworkCore
r.Property(x => x.EntityType).IsRequired().HasMaxLength(RatingConsts.MaxEntityTypeLength);
r.Property(x => x.EntityId).IsRequired().HasMaxLength(RatingConsts.MaxEntityIdLength);
r.HasIndex(x => new { x.TenantId, x.EntityType, x.EntityId, x.CreatorId });
r.HasIndex(x => new {x.TenantId, x.EntityType, x.EntityId, x.CreatorId});
});
}
@ -109,49 +109,52 @@ namespace Volo.CmsKit.EntityFrameworkCore
b.Property(x => x.EntityId).IsRequired().HasMaxLength(ContentConsts.MaxEntityIdLength);
b.Property(x => x.Value).IsRequired().HasMaxLength(ContentConsts.MaxValueLength);
b.HasIndex(x => new { x.TenantId, x.EntityType, x.EntityId });
b.HasIndex(x => new {x.TenantId, x.EntityType, x.EntityId});
});
}
builder.Entity<Tag>(b =>
if (GlobalFeatureManager.Instance.IsEnabled<TagsFeature>())
{
b.ToTable(options.TablePrefix + "Tags", options.Schema);
builder.Entity<Tag>(b =>
{
b.ToTable(options.TablePrefix + "Tags", options.Schema);
b.ConfigureByConvention();
b.ConfigureByConvention();
b.Property(x => x.EntityType).IsRequired().HasMaxLength(TagConsts.MaxEntityTypeLength);
b.Property(x => x.Name).IsRequired().HasMaxLength(TagConsts.MaxNameLength);
b.Property(x => x.EntityType).IsRequired().HasMaxLength(TagConsts.MaxEntityTypeLength);
b.Property(x => x.Name).IsRequired().HasMaxLength(TagConsts.MaxNameLength);
b.HasIndex(x => new { x.TenantId, x.Name });
});
b.HasIndex(x => new {x.TenantId, x.Name});
});
builder.Entity<EntityTag>(b =>
{
b.ToTable(options.TablePrefix + "EntityTags", options.Schema);
builder.Entity<EntityTag>(b =>
{
b.ToTable(options.TablePrefix + "EntityTags", options.Schema);
b.ConfigureByConvention();
b.ConfigureByConvention();
b.HasKey(x => new { x.EntityId, x.TagId });
b.HasKey(x => new {x.EntityId, x.TagId});
b.Property(x => x.EntityId).IsRequired();
b.Property(x => x.TagId).IsRequired();
b.Property(x => x.EntityId).IsRequired();
b.Property(x => x.TagId).IsRequired();
b.HasIndex(x => new { x.TenantId, x.EntityId, x.TagId });
});
b.HasIndex(x => new {x.TenantId, x.EntityId, x.TagId});
});
}
builder.Entity<Page>(b =>
if (GlobalFeatureManager.Instance.IsEnabled<PagesFeature>())
{
b.ToTable(options.TablePrefix + "Pages", options.Schema);
builder.Entity<Page>(b =>
{
b.ToTable(options.TablePrefix + "Pages", options.Schema);
b.ConfigureByConvention();
b.ConfigureByConvention();
b.Property(x => x.Title).IsRequired().HasMaxLength(PageConsts.MaxTitleLength);
b.Property(x => x.Url).IsRequired().HasMaxLength(PageConsts.MaxUrlLength);
b.Property(x => x.Description).HasMaxLength(PageConsts.MaxDescriptionLength);
b.Property(x => x.Title).IsRequired().HasMaxLength(PageConsts.MaxTitleLength);
b.Property(x => x.Url).IsRequired().HasMaxLength(PageConsts.MaxUrlLength);
b.Property(x => x.Description).HasMaxLength(PageConsts.MaxDescriptionLength);
b.HasIndex(x => new { x.TenantId, x.Url });
});
b.HasIndex(x => new {x.TenantId, x.EntityType, x.EntityId});
b.HasIndex(x => new {x.TenantId, x.Url});
});
}
@ -201,4 +204,4 @@ namespace Volo.CmsKit.EntityFrameworkCore
}
}
}
}
}
Loading…
Cancel
Save