using FinlyticSentiment.Entities;
using Microsoft.EntityFrameworkCore;
namespace FinlyticSentiment.Database;
///
/// EF Core DbContext for managing FinlyticSentiment settings in PostgreSQL.
///
public class SentimentDbContext : DbContext
{
public SentimentDbContext(DbContextOptions options) : base(options)
{
}
public DbSet Settings => Set();
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity(entity =>
{
entity.ToTable("sentiment_settings");
entity.HasKey(e => e.Id);
entity.Property(e => e.GermanWebhookUrl).HasMaxLength(500);
entity.Property(e => e.EnglishWebhookUrl).HasMaxLength(500);
});
}
}