using JSMR.Domain.Entities;
using Microsoft.EntityFrameworkCore;

namespace JSMR.Infrastructure.Data;

public class AppDbContext(DbContextOptions<AppDbContext> options) : DbContext(options)
{
    public DbSet<VoiceWork> VoiceWorks { get; set; }
    public DbSet<EnglishVoiceWork> EnglishVoiceWorks { get; set; }
    public DbSet<VoiceWorkSupportedLanguage> VoiceWorkSupportedLanguages { get; set; }
    public DbSet<VoiceWorkLocalization> VoiceWorkLocalizations { get; set; }
    public DbSet<Circle> Circles { get; set; }
    public DbSet<Tag> Tags { get; set; }
    public DbSet<EnglishTag> EnglishTags { get; set; }
    public DbSet<VoiceWorkTag> VoiceWorkTags { get; set; }
    public DbSet<Creator> Creators { get; set; }
    public DbSet<VoiceWorkCreator> VoiceWorkCreators { get; set; }
    public DbSet<Series> Series { get; set; }
    public DbSet<VoiceWorkSearch> VoiceWorkSearches { get; set; }
    public DbSet<User> Users { get; set; }
    public DbSet<Job> Jobs { get; set; }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.ApplyConfigurationsFromAssembly(typeof(AppDbContext).Assembly);
    }
}