Added functionality to the database for a WhoWas feature that can say when a user was last in chat

This commit is contained in:
barelyprofessional
2025-04-13 13:09:46 -05:00
parent 291ca7954e
commit dd0f6cee6c
6 changed files with 471 additions and 0 deletions

View File

@@ -273,6 +273,31 @@ namespace KfChatDotNetBot.Migrations
b.ToTable("Users");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.UserWhoWasDbModel", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("ActivityType")
.HasColumnType("INTEGER");
b.Property<DateTimeOffset>("FirstOccurence")
.HasColumnType("TEXT");
b.Property<DateTimeOffset>("LatestOccurence")
.HasColumnType("TEXT");
b.Property<int>("UserId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("UsersWhoWere");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.JuicerDbModel", b =>
{
b.HasOne("KfChatDotNetBot.Models.DbModels.UserDbModel", "User")
@@ -283,6 +308,17 @@ namespace KfChatDotNetBot.Migrations
b.Navigation("User");
});
modelBuilder.Entity("KfChatDotNetBot.Models.DbModels.UserWhoWasDbModel", b =>
{
b.HasOne("KfChatDotNetBot.Models.DbModels.UserDbModel", "User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("User");
});
#pragma warning restore 612, 618
}
}