using Microsoft.EntityFrameworkCore; using StreakBot.Data.Entities; namespace StreakBot.Data; public class StreakDbContext : DbContext { public StreakDbContext(DbContextOptions options) : base(options) { } public DbSet Streaks => Set(); public DbSet Channels => Set(); protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity(entity => { entity.HasKey(e => e.Id); entity.Property(e => e.CreatedDate).IsRequired(); entity.Property(e => e.User1Id).IsRequired(); entity.Property(e => e.User2Id).IsRequired(); entity.Property(e => e.ServerId).IsRequired(); entity.Property(e => e.LastResetCheck).IsRequired(); entity.Property(e => e.ReminderSent).IsRequired(); }); modelBuilder.Entity(entity => { entity.HasKey(e => e.Id); entity.Property(e => e.ServerId).IsRequired(); entity.Property(e => e.ChannelId).IsRequired(); entity.Property(e => e.ChannelType).IsRequired(); }); } }