using System.Data; using ChaosBot.Attribute; namespace ChaosBot.Database.Entity { [DBEntity("PointsTable")] public class Points : BaseEntity { [DBPrimaryKey] [DBAutoIncrement] [DBNotNull] [DBUnique] public int id { get; private set; } public int points { get; private set; } public long userId { get; private set; } public long guildId { get; private set; } public Points() {} public Points(int id, long userId, long guildId, int points) { this.id = id; this.userId = userId; this.guildId = guildId; this.points = points; } public Points(long userId, long guildId, int points) { this.points = points; 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"]; points = (int)row["points"]; } } }