4c6f9a4ba8
Database Migration, Repositories, Automapper, Logger, StaticFiles
24 lines
618 B
C#
24 lines
618 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace PortBlog.API.Entities
|
|
{
|
|
public class Blog : BaseEntity
|
|
{
|
|
[Required]
|
|
[MaxLength(200)]
|
|
[Url]
|
|
[Key]
|
|
public string BlogUrl { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
[MaxLength(50)]
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
[MaxLength(200)]
|
|
public string? Description { get; set; } = string.Empty;
|
|
|
|
public ICollection<Post> Posts { get; set; } = new List<Post>();
|
|
}
|
|
} |