|
|
|
@ -35,8 +35,7 @@ namespace Volo.Blogging.EntityFrameworkCore |
|
|
|
{ |
|
|
|
b.ToTable(options.TablePrefix + "Blogs", options.Schema); |
|
|
|
|
|
|
|
b.ConfigureFullAudited(); |
|
|
|
b.ConfigureExtraProperties(); |
|
|
|
b.ConfigureFullAuditedAggregateRoot(); |
|
|
|
|
|
|
|
b.Property(x => x.Name).IsRequired().HasMaxLength(BlogConsts.MaxNameLength).HasColumnName(nameof(Blog.Name)); |
|
|
|
b.Property(x => x.ShortName).IsRequired().HasMaxLength(BlogConsts.MaxShortNameLength).HasColumnName(nameof(Blog.ShortName)); |
|
|
|
@ -47,8 +46,7 @@ namespace Volo.Blogging.EntityFrameworkCore |
|
|
|
{ |
|
|
|
b.ToTable(options.TablePrefix + "Posts", options.Schema); |
|
|
|
|
|
|
|
b.ConfigureFullAudited(); |
|
|
|
b.ConfigureExtraProperties(); |
|
|
|
b.ConfigureFullAuditedAggregateRoot(); |
|
|
|
|
|
|
|
b.Property(x => x.BlogId).HasColumnName(nameof(Post.BlogId)); |
|
|
|
b.Property(x => x.Title).IsRequired().HasMaxLength(PostConsts.MaxTitleLength).HasColumnName(nameof(Post.Title)); |
|
|
|
@ -65,8 +63,7 @@ namespace Volo.Blogging.EntityFrameworkCore |
|
|
|
{ |
|
|
|
b.ToTable(options.TablePrefix + "Comments", options.Schema); |
|
|
|
|
|
|
|
b.ConfigureFullAudited(); |
|
|
|
b.ConfigureExtraProperties(); |
|
|
|
b.ConfigureFullAuditedAggregateRoot(); |
|
|
|
|
|
|
|
b.Property(x => x.Text).IsRequired().HasMaxLength(CommentConsts.MaxTextLength).HasColumnName(nameof(Comment.Text)); |
|
|
|
b.Property(x => x.RepliedCommentId).HasColumnName(nameof(Comment.RepliedCommentId)); |
|
|
|
@ -80,8 +77,7 @@ namespace Volo.Blogging.EntityFrameworkCore |
|
|
|
{ |
|
|
|
b.ToTable(options.TablePrefix + "Tags", options.Schema); |
|
|
|
|
|
|
|
b.ConfigureFullAudited(); |
|
|
|
b.ConfigureExtraProperties(); |
|
|
|
b.ConfigureFullAuditedAggregateRoot(); |
|
|
|
|
|
|
|
b.Property(x => x.Name).IsRequired().HasMaxLength(TagConsts.MaxNameLength).HasColumnName(nameof(Tag.Name)); |
|
|
|
b.Property(x => x.Description).HasMaxLength(TagConsts.MaxDescriptionLength).HasColumnName(nameof(Tag.Description)); |
|
|
|
|