Files
poprhythm 8b0451c2ec Add IsPinned and IsDeleted properties to Note entity with corresponding database configurations and migrations
This commit enhances the Note entity by introducing two new properties: IsPinned and IsDeleted, allowing for better management of note visibility and status. The NoteConfiguration class has been updated to include indexes for these properties, improving query performance. Additionally, new migrations have been created to reflect these changes in the database schema. The UI components have been updated to support pinning and restoring notes, enhancing user interaction and functionality within the note management system.
2026-01-16 23:12:18 -05:00

37 lines
855 B
C#

using System.ComponentModel.DataAnnotations;
namespace Core.Entities;
public class Note
{
public int Id { get; set; }
[Required]
[StringLength(200)]
[Display(Name = "Title")]
public string Title { get; set; } = null!;
[Display(Name = "Content")]
public string? Content { get; set; }
[Display(Name = "Created At")]
public DateTime CreatedAt { get; set; }
[Display(Name = "Updated At")]
public DateTime UpdatedAt { get; set; }
[Display(Name = "Created By")]
public string? CreatedBy { get; set; }
[Display(Name = "Last Modified By")]
public string? LastModifiedBy { get; set; }
[Display(Name = "Is Pinned")]
public bool IsPinned { get; set; }
[Display(Name = "Is Deleted")]
public bool IsDeleted { get; set; }
public List<NoteHistory> NoteHistories { get; } = [];
}