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<PermissionSettings> PermissionSettings{get;set;}
|
2023-06-19 12:56:40 -04:00
|
|
|
public DbSet<Account> Users { get; set; }
|
2023-06-01 00:03:23 -04:00
|
|
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
2023-06-05 14:55:48 -04:00
|
|
|
=> optionsBuilder.UseNpgsql(Shared.DBConnectionString)
|
|
|
|
.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
|
|
|
}
|