You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
602 B
23 lines
602 B
using MongoDB.Bson; |
|
using MongoDB.Bson.Serialization.Attributes; |
|
|
|
namespace backend.Models; |
|
|
|
public class BlogPost |
|
{ |
|
[BsonId] |
|
[BsonRepresentation(BsonType.ObjectId)] |
|
public string? Id { get; set; } = null; |
|
|
|
public string AuthorId { get; set; } = null; |
|
public string Title { get; set; } = null; |
|
public string Content { get; set; } = null; |
|
|
|
//Meta data |
|
[BsonRepresentation(BsonType.DateTime)] |
|
public DateTime? CreatedAt { get; set; } |
|
[BsonRepresentation(BsonType.DateTime)] |
|
public DateTime? UpdatedAt { get; set; } |
|
|
|
public List<string> Tags { get; set; } |
|
} |