using Microsoft.EntityFrameworkCore;

namespace RobotNet.ScriptManager.Data;

public class ScriptManagerDbContext(DbContextOptions<ScriptManagerDbContext> options) : DbContext(options)
{
    public DbSet<InstanceMission> InstanceMissions { get; private set; }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        base.OnModelCreating(modelBuilder);

        modelBuilder.Entity<InstanceMission>()
            .HasIndex(im => im.CreatedAt);
    }
}
