SPMS_API/SPMS.Infrastructure/AppDbContext.cs
SEAN c29a48163d improvement: Notification 도메인 구축 (#247)
- Domain: NotificationCategory enum, Notification entity, INotificationRepository
- Infrastructure: NotificationConfiguration, NotificationRepository, AppDbContext/DI 등록
- Migration: AddNotificationTable 생성 및 적용
- Application: DTO 7개, INotificationService, NotificationService, DI 등록
- API: NotificationController (summary, list, read, read-all)

Closes #247
2026-02-26 09:44:28 +09:00

37 lines
1.4 KiB
C#

using Microsoft.EntityFrameworkCore;
using SPMS.Domain.Entities;
namespace SPMS.Infrastructure;
public class AppDbContext : DbContext
{
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
{
}
public DbSet<Service> Services => Set<Service>();
public DbSet<ServiceIp> ServiceIps => Set<ServiceIp>();
public DbSet<Admin> Admins => Set<Admin>();
public DbSet<Device> Devices => Set<Device>();
public DbSet<Message> Messages => Set<Message>();
public DbSet<FileEntity> Files => Set<FileEntity>();
public DbSet<PushSendLog> PushSendLogs => Set<PushSendLog>();
public DbSet<PushOpenLog> PushOpenLogs => Set<PushOpenLog>();
public DbSet<DailyStat> DailyStats => Set<DailyStat>();
public DbSet<WebhookLog> WebhookLogs => Set<WebhookLog>();
public DbSet<SystemLog> SystemLogs => Set<SystemLog>();
public DbSet<Payment> Payments => Set<Payment>();
public DbSet<Notice> Notices => Set<Notice>();
public DbSet<Banner> Banners => Set<Banner>();
public DbSet<Faq> Faqs => Set<Faq>();
public DbSet<AppConfig> AppConfigs => Set<AppConfig>();
public DbSet<Tag> Tags => Set<Tag>();
public DbSet<Notification> Notifications => Set<Notification>();
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.ApplyConfigurationsFromAssembly(typeof(AppDbContext).Assembly);
}
}