using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore; namespace Iceshrimp.Backend.Core.Database.Tables; [Table("channel_note_pin")] [Index("ChannelId")] [Index("ChannelId", "NoteId", IsUnique = true)] public class ChannelNotePin { [Key] [Column("id")] [StringLength(32)] public string Id { get; set; } = null!; /// /// The created date of the ChannelNotePin. /// [Column("createdAt")] public DateTime CreatedAt { get; set; } [Column("channelId")] [StringLength(32)] public string ChannelId { get; set; } = null!; [Column("noteId")] [StringLength(32)] public string NoteId { get; set; } = null!; [ForeignKey("ChannelId")] [InverseProperty("ChannelNotePins")] public virtual Channel Channel { get; set; } = null!; [ForeignKey("NoteId")] [InverseProperty("ChannelNotePins")] public virtual Note Note { get; set; } = null!; }