mirror of
https://github.com/PacktPublishing/Web-Development-with-Blazor-Second-Edition.git
synced 2025-12-06 05:32:03 +01:00
15 lines
428 B
C#
15 lines
428 B
C#
namespace Data.Models;
|
|
using System.ComponentModel.DataAnnotations;
|
|
public class BlogPost
|
|
{
|
|
public string? Id { get; set; }
|
|
[MinLength(5)]
|
|
[Required]
|
|
public string Title { get; set; } = string.Empty;
|
|
[Required]
|
|
public string Text { get; set; } = string.Empty;
|
|
public DateTime PublishDate { get; set; }
|
|
public Category? Category { get; set; }
|
|
public List<Tag> Tags { get; set; } = new();
|
|
}
|