Added a generic interface for retrieving images. Where multiple images exist, it'll retrieve the least seen. If there are sufficient images to work with, it'll randomly pick from a subset of the least seen to make it less predictable what's going to show up.

This commit is contained in:
barelyprofessional
2025-02-15 23:31:26 +08:00
parent 5eb2ef62b9
commit 7e9137c35c
10 changed files with 642 additions and 297 deletions

View File

@@ -102,6 +102,28 @@ namespace KfChatDotNetBot.Migrations
b.ToTable("HowlggBets");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.ImageDbModel", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Key")
.IsRequired()
.HasColumnType("TEXT");
b.Property<DateTimeOffset>("LastSeen")
.HasColumnType("TEXT");
b.Property<string>("Url")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Images");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.JuicerDbModel", b =>
{
b.Property<int>("Id")