using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore; namespace Iceshrimp.Backend.Core.Database.Tables; [Table("note_edit")] [Index(nameof(NoteId))] public class NoteEdit { [Key] [Column("id")] [StringLength(32)] public string Id { get; set; } = null!; /// /// The ID of note. /// [Column("noteId")] [StringLength(32)] public string NoteId { get; set; } = null!; [Column("text")] public string? Text { get; set; } [Column("cw")] [StringLength(512)] public string? Cw { get; set; } [Column("fileIds", TypeName = "character varying(32)[]")] public List FileIds { get; set; } = null!; /// /// The updated date of the Note. /// [Column("updatedAt")] public DateTime UpdatedAt { get; set; } [ForeignKey(nameof(NoteId))] [InverseProperty(nameof(Tables.Note.NoteEdits))] public virtual Note Note { get; set; } = null!; }