using FocusApp.Models; using Microsoft.EntityFrameworkCore; namespace FocusApp.Data; public class FocusContext : DbContext { public DbSet FocusTasks { get; set; } public FocusContext(DbContextOptions options) : base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Entity(entity => { entity.HasKey(e => e.Id); entity.Property(e => e.Title).IsRequired().HasMaxLength(255); entity.Property(e => e.Description).HasMaxLength(2000); entity.Property(e => e.Order).IsRequired(); entity.Property(e => e.CreatedAt).IsRequired(); entity.Property(e => e.UpdatedAt).IsRequired(); }); } }