vassago/Models/ChattingContext.cs

22 lines
870 B
C#
Raw Normal View History

2023-06-01 00:03:23 -04:00
namespace vassago.Models;
2023-06-05 14:55:48 -04:00
using Microsoft.Extensions.Configuration;
2023-06-01 00:03:23 -04:00
using Microsoft.EntityFrameworkCore;
public class ChattingContext : DbContext
{
public DbSet<Attachment> Attachments { get; set; }
public DbSet<Channel> Channels { get; set; }
//public DbSet<Emoji> Emoji {get;set;}
public DbSet<Message> Messages { get; set; }
public DbSet<Account> Accounts { get; set; }
public DbSet<User> Users { get; set; }
2023-06-01 00:03:23 -04:00
2023-07-04 20:40:37 -04:00
public ChattingContext(DbContextOptions<ChattingContext> options) : base(options) { }
public ChattingContext() : base() { }
2023-06-01 00:03:23 -04:00
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseNpgsql(Shared.DBConnectionString)
2023-06-05 14:55:48 -04:00
.EnableSensitiveDataLogging(true); //who the fuck is looking at log output but not allowed to see it? this should be on by default.
}
2023-06-01 00:03:23 -04:00
}