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; }
|
2023-06-28 00:14:32 -04:00
|
|
|
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)
|
2024-04-05 22:15:59 -04:00
|
|
|
{
|
|
|
|
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.
|
2024-04-05 22:15:59 -04:00
|
|
|
}
|
2023-06-01 00:03:23 -04:00
|
|
|
}
|