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")]
|
2022-10-10 21:27:54 +00:00
|
|
|
|
public string? GuildTimeZone { get; set; }
|
2022-11-23 07:19:37 +00:00
|
|
|
|
|
2022-03-19 07:00:15 +00:00
|
|
|
|
public bool Moderated { get; set; }
|
2022-11-23 07:19:37 +00:00
|
|
|
|
|
2023-01-17 05:52:11 +00:00
|
|
|
|
[Obsolete("To be removed when RequireBotModeratorAttribute is also removed")]
|
2022-11-23 07:19:37 +00:00
|
|
|
|
public ulong? ModeratorRole { get; set; }
|
|
|
|
|
|
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; }
|
2022-11-23 07:19:37 +00:00
|
|
|
|
|
2022-03-19 07:00:15 +00:00
|
|
|
|
public DateTimeOffset LastSeen { get; set; }
|
|
|
|
|
|
|
|
|
|
[InverseProperty(nameof(UserEntry.Guild))]
|
2023-01-17 05:52:11 +00:00
|
|
|
|
public ICollection<UserEntry> UserEntries { get; set; } = null!;
|
2022-03-20 01:10:10 +00:00
|
|
|
|
|
|
|
|
|
/// <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
|
|
|
|
}
|