using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Iceshrimp.Backend.Core.Database.Tables;
[Table("announcement")]
[Index("CreatedAt", Name = "IDX_118ec703e596086fc4515acb39")]
public class Announcement {
[Key]
[Column("id")]
[StringLength(32)]
public string Id { get; set; } = null!;
///
/// The created date of the Announcement.
///
[Column("createdAt")]
public DateTime CreatedAt { get; set; }
[Column("text")] [StringLength(8192)] public string Text { get; set; } = null!;
[Column("title")] [StringLength(256)] public string Title { get; set; } = null!;
[Column("imageUrl")]
[StringLength(1024)]
public string? ImageUrl { get; set; }
///
/// The updated date of the Announcement.
///
[Column("updatedAt")]
public DateTime? UpdatedAt { get; set; }
[Column("showPopup")] public bool ShowPopup { get; set; }
[Column("isGoodNews")] public bool IsGoodNews { get; set; }
[InverseProperty("Announcement")]
public virtual ICollection AnnouncementReads { get; set; } = new List();
}