feat: add post redirect schema
This commit is contained in:
parent
0c594ac306
commit
8b2f0fb454
@ -23,12 +23,24 @@ public sealed class BlogPost : IEquatable<BlogPost>
|
||||
/// <value>The ID.</value>
|
||||
public int Id { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the blog post is a redirect.
|
||||
/// </summary>
|
||||
/// <value><see langword="true" /> if the blog post is a redirect; otherwise, <see langword="false" />.</value>
|
||||
public bool IsRedirect { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the date and time at which the blog post was published.
|
||||
/// </summary>
|
||||
/// <value>The publish timestamp.</value>
|
||||
public DateTimeOffset Published { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the redirect URL of the blog post.
|
||||
/// </summary>
|
||||
/// <value>The redirect URL.</value>
|
||||
public string? RedirectUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the URL slug of the blog post.
|
||||
/// </summary>
|
||||
|
@ -22,5 +22,7 @@ internal sealed class BlogPostConfiguration : IEntityTypeConfiguration<BlogPost>
|
||||
builder.Property(e => e.Updated).IsRequired(false);
|
||||
builder.Property(e => e.Title).HasMaxLength(255).IsRequired();
|
||||
builder.Property(e => e.Body).IsRequired();
|
||||
builder.Property(e => e.IsRedirect).IsRequired();
|
||||
builder.Property(e => e.RedirectUrl).IsRequired(false);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user