feat(Sentiment): update sentiment service
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using FinlyticSentiment.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace FinlyticSentiment.Database;
|
||||
|
||||
/// <summary>
|
||||
/// EF Core DbContext for managing FinlyticSentiment settings in PostgreSQL.
|
||||
/// </summary>
|
||||
public class SentimentDbContext : DbContext
|
||||
{
|
||||
public SentimentDbContext(DbContextOptions<SentimentDbContext> options) : base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public DbSet<SentimentSettingsEntity> Settings => Set<SentimentSettingsEntity>();
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
modelBuilder.Entity<SentimentSettingsEntity>(entity =>
|
||||
{
|
||||
entity.ToTable("sentiment_settings");
|
||||
entity.HasKey(e => e.Id);
|
||||
entity.Property(e => e.GermanWebhookUrl).HasMaxLength(500);
|
||||
entity.Property(e => e.EnglishWebhookUrl).HasMaxLength(500);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user