ref: project structure
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using mws.backend.dotnet.domain.Documents;
|
||||
using mws.backend.dotnet.domain.MasterData;
|
||||
using mws.backend.dotnet.domain.Projects;
|
||||
using mws.backend.dotnet.domain.Roles;
|
||||
using mws.backend.dotnet.domain.Tasks;
|
||||
using mws.backend.dotnet.domain.Users;
|
||||
|
||||
namespace mws.backend.dotnet.infrastructure.Persistence;
|
||||
|
||||
public class AppDbContext(DbContextOptions<AppDbContext> options) : DbContext(options)
|
||||
{
|
||||
public DbSet<User> Users => Set<User>();
|
||||
public DbSet<UserRole> UserRoles => Set<UserRole>();
|
||||
public DbSet<Project> Projects => Set<Project>();
|
||||
public DbSet<ProjectMember> ProjectMembers => Set<ProjectMember>();
|
||||
public DbSet<ProjectMemberPermission> ProjectMemberPermissions => Set<ProjectMemberPermission>();
|
||||
public DbSet<Document> Documents => Set<Document>();
|
||||
public DbSet<TaskItem> Tasks => Set<TaskItem>();
|
||||
public DbSet<Role> Roles => Set<Role>();
|
||||
public DbSet<RolePermission> RolePermissions => Set<RolePermission>();
|
||||
public DbSet<MasterDataEntry> MasterData => Set<MasterDataEntry>();
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.ApplyConfigurationsFromAssembly(typeof(AppDbContext).Assembly);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user