BirthdayBot/Data/GuildConfig.cs

36 lines
942 B
C#
Raw Permalink Normal View History

2022-03-19 07:00:15 +00:00
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BirthdayBot.Data;
[Table("settings")]
public class GuildConfig {
[Key]
2022-11-23 07:19:37 +00:00
public ulong GuildId { get; set; }
2022-03-19 07:00:15 +00:00
[Column("role_id")]
2022-11-23 07:19:37 +00:00
public ulong? BirthdayRole { get; set; }
2022-03-19 07:00:15 +00:00
[Column("channel_announce_id")]
2022-11-23 07:19:37 +00:00
public ulong? AnnouncementChannel { get; set; }
2022-03-19 07:00:15 +00:00
[Column("time_zone")]
public string? GuildTimeZone { get; set; }
2022-11-23 07:19:37 +00:00
2022-03-19 07:00:15 +00:00
public string? AnnounceMessage { get; set; }
2022-11-23 07:19:37 +00:00
2022-03-19 07:00:15 +00:00
public string? AnnounceMessagePl { get; set; }
2022-11-23 07:19:37 +00:00
2022-03-19 07:00:15 +00:00
public bool AnnouncePing { get; set; }
2024-04-28 08:51:58 +00:00
2022-03-19 07:00:15 +00:00
public DateTimeOffset LastSeen { get; set; }
[InverseProperty(nameof(UserEntry.Guild))]
public ICollection<UserEntry> UserEntries { get; set; } = null!;
/// <summary>
/// Gets if this instance is new and does not (yet) exist in the database.
/// </summary>
[NotMapped]
public bool IsNew { get; set; }
2022-03-19 07:00:15 +00:00
}