Added .todo commands and added toned down version of .fairplay

This commit is contained in:
Kwoth
2024-04-25 22:33:12 +00:00
parent b34f383649
commit 6bc8e4b7d2
30 changed files with 12293 additions and 148 deletions

View File

@@ -62,6 +62,9 @@ public abstract class NadekoContext : DbContext
public DbSet<StreamOnlineMessage> StreamOnlineMessages { get; set; }
public DbSet<StickyRole> StickyRoles { get; set; }
public DbSet<TodoModel> Todos { get; set; }
public DbSet<ArchivedTodoListModel> TodosArchive { get; set; }
#region Mandatory Provider-Specific Values
@@ -512,6 +515,23 @@ public abstract class NadekoContext : DbContext
.IsUnique());
#endregion
#region Todo
modelBuilder.Entity<TodoModel>()
.HasKey(x => x.Id);
modelBuilder.Entity<TodoModel>()
.HasIndex(x => x.UserId)
.IsUnique(false);
modelBuilder.Entity<ArchivedTodoListModel>()
.HasMany(x => x.Items)
.WithOne()
.HasForeignKey(x => x.ArchiveId)
.OnDelete(DeleteBehavior.Cascade);
#endregion
}
#if DEBUG