mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-03 04:52:04 -04:00
Big update introducing ghetto command interface, settings, database and howl.gg bet feed scraping
This commit is contained in:
17
KfChatDotNetKickBot/Models/DbModels/HowlggBetsDbModel.cs
Normal file
17
KfChatDotNetKickBot/Models/DbModels/HowlggBetsDbModel.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace KfChatDotNetKickBot.Models.DbModels;
|
||||
|
||||
public class HowlggBetsDbModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public required int UserId { get; set; }
|
||||
// Per-user bet ID, counts up based on total # of bets
|
||||
public required int BetId { get; set; }
|
||||
// Global bet ID
|
||||
public required long GameId { get; set; }
|
||||
// Cents
|
||||
public required long Bet { get; set; }
|
||||
// Cents
|
||||
public required long Profit { get; set; }
|
||||
public required DateTimeOffset Date { get; set; }
|
||||
public required string Game { get; set; }
|
||||
}
|
||||
9
KfChatDotNetKickBot/Models/DbModels/JuicerDbModel.cs
Normal file
9
KfChatDotNetKickBot/Models/DbModels/JuicerDbModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace KfChatDotNetKickBot.Models.DbModels;
|
||||
|
||||
public class JuicerDbModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public required UserDbModel User { get; set; }
|
||||
public float Amount { get; set; }
|
||||
public DateTimeOffset JuicedAt { get; set; }
|
||||
}
|
||||
19
KfChatDotNetKickBot/Models/DbModels/SettingDbModel.cs
Normal file
19
KfChatDotNetKickBot/Models/DbModels/SettingDbModel.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace KfChatDotNetKickBot.Models.DbModels;
|
||||
|
||||
public class SettingDbModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public required string Key { get; set; }
|
||||
public string? Value { get; set; }
|
||||
// For validation
|
||||
public required string Regex { get; set; } = @"\S+";
|
||||
// Friendly descriptor for the setting, e.g. "BossmanJack's howl.gg ID"
|
||||
public required string Description { get; set; }
|
||||
// Default to use when constructing the setting and nothing is supplied
|
||||
public string? Default { get; set; } = null;
|
||||
// Prevents the value from being revealed to Sneedchat when queried by an admin
|
||||
public bool IsSecret { get; set; } = false;
|
||||
}
|
||||
21
KfChatDotNetKickBot/Models/DbModels/UserDbModel.cs
Normal file
21
KfChatDotNetKickBot/Models/DbModels/UserDbModel.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace KfChatDotNetKickBot.Models.DbModels;
|
||||
|
||||
public class UserDbModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public required string KfUsername { get; set; }
|
||||
public int KfId { get; set; }
|
||||
public UserRight UserRight { get; set; } = UserRight.Guest;
|
||||
public bool Ignored { get; set; } = false;
|
||||
}
|
||||
|
||||
public enum UserRight
|
||||
{
|
||||
Admin = 1000,
|
||||
[Description("True and Honest")]
|
||||
TrueAndHonest = 100,
|
||||
Guest = 10,
|
||||
Loser = 0
|
||||
}
|
||||
Reference in New Issue
Block a user