BirthdayBot/Data/GuildConfig.cs
Noi d262191d52 Replace preconditions with Discord permissions
Removed precondition code, moderator roles, unused database values.
Slightly rearranged commands.
2023-02-03 22:55:00 -08:00

35 lines
946 B
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace BirthdayBot.Data;
[Table("settings")]
public class GuildConfig {
[Key]
public ulong GuildId { get; set; }
[Column("role_id")]
public ulong? BirthdayRole { get; set; }
[Column("channel_announce_id")]
public ulong? AnnouncementChannel { get; set; }
[Column("time_zone")]
public string? GuildTimeZone { get; set; }
public string? AnnounceMessage { get; set; }
public string? AnnounceMessagePl { get; set; }
public bool AnnouncePing { get; set; }
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; }
}