using System; using System.Data; using ChaosBot.Attribute; namespace ChaosBot.Database.Entity { [DBEntity("RaffleTable")] public class Raffle : BaseEntity { [DBPrimaryKey] [DBAutoIncrement] [DBNotNull] [DBUnique] public Nullable id { get; private set; } public long userId { get; private set; } public long guildId { get; private set; } public Raffle() {} public Raffle(int id, long userId, long guildId) { this.id = id; this.userId = userId; this.guildId = guildId; } public Raffle(long userId, long guildId) { this.userId = userId; this.guildId = guildId; } public static QueryBuilder Query() { return BaseEntity.Query(); } public override void SetFromRow(DataRow row) { id = (int)row["id"]; userId = (long)row["userid"]; guildId = (long) row["guildid"]; } } }