mirror of
https://github.com/bitwarden/server
synced 2025-12-18 01:03:17 +00:00
[PM-1188] Move EF auth models for code ownership (#2859)
* [PM-1188] move ef auth files to auth folder * [PM-1188] rename ef models namespace * [PM-1188] fix auth ef model imports * [PM-1188] fix ef model usings
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using AutoMapper;
|
||||
using Bit.Infrastructure.EntityFramework.Models;
|
||||
|
||||
namespace Bit.Infrastructure.EntityFramework.Auth.Models;
|
||||
|
||||
public class AuthRequest : Core.Auth.Entities.AuthRequest
|
||||
{
|
||||
public virtual User User { get; set; }
|
||||
public virtual Device ResponseDevice { get; set; }
|
||||
}
|
||||
|
||||
public class AuthRequestMapperProfile : Profile
|
||||
{
|
||||
public AuthRequestMapperProfile()
|
||||
{
|
||||
CreateMap<Core.Auth.Entities.AuthRequest, AuthRequest>().ReverseMap();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using AutoMapper;
|
||||
using Bit.Infrastructure.EntityFramework.Models;
|
||||
|
||||
namespace Bit.Infrastructure.EntityFramework.Auth.Models;
|
||||
|
||||
public class EmergencyAccess : Core.Auth.Entities.EmergencyAccess
|
||||
{
|
||||
public virtual User Grantee { get; set; }
|
||||
public virtual User Grantor { get; set; }
|
||||
}
|
||||
|
||||
public class EmergencyAccessMapperProfile : Profile
|
||||
{
|
||||
public EmergencyAccessMapperProfile()
|
||||
{
|
||||
CreateMap<Core.Auth.Entities.EmergencyAccess, EmergencyAccess>().ReverseMap();
|
||||
}
|
||||
}
|
||||
15
src/Infrastructure.EntityFramework/Auth/Models/Grant.cs
Normal file
15
src/Infrastructure.EntityFramework/Auth/Models/Grant.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using AutoMapper;
|
||||
|
||||
namespace Bit.Infrastructure.EntityFramework.Auth.Models;
|
||||
|
||||
public class Grant : Core.Auth.Entities.Grant
|
||||
{
|
||||
}
|
||||
|
||||
public class GrantMapperProfile : Profile
|
||||
{
|
||||
public GrantMapperProfile()
|
||||
{
|
||||
CreateMap<Core.Auth.Entities.Grant, Grant>().ReverseMap();
|
||||
}
|
||||
}
|
||||
17
src/Infrastructure.EntityFramework/Auth/Models/SsoConfig.cs
Normal file
17
src/Infrastructure.EntityFramework/Auth/Models/SsoConfig.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using AutoMapper;
|
||||
using Bit.Infrastructure.EntityFramework.Models;
|
||||
|
||||
namespace Bit.Infrastructure.EntityFramework.Auth.Models;
|
||||
|
||||
public class SsoConfig : Core.Auth.Entities.SsoConfig
|
||||
{
|
||||
public virtual Organization Organization { get; set; }
|
||||
}
|
||||
|
||||
public class SsoConfigMapperProfile : Profile
|
||||
{
|
||||
public SsoConfigMapperProfile()
|
||||
{
|
||||
CreateMap<Core.Auth.Entities.SsoConfig, SsoConfig>().ReverseMap();
|
||||
}
|
||||
}
|
||||
18
src/Infrastructure.EntityFramework/Auth/Models/SsoUser.cs
Normal file
18
src/Infrastructure.EntityFramework/Auth/Models/SsoUser.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using AutoMapper;
|
||||
using Bit.Infrastructure.EntityFramework.Models;
|
||||
|
||||
namespace Bit.Infrastructure.EntityFramework.Auth.Models;
|
||||
|
||||
public class SsoUser : Core.Auth.Entities.SsoUser
|
||||
{
|
||||
public virtual Organization Organization { get; set; }
|
||||
public virtual User User { get; set; }
|
||||
}
|
||||
|
||||
public class SsoUserMapperProfile : Profile
|
||||
{
|
||||
public SsoUserMapperProfile()
|
||||
{
|
||||
CreateMap<Core.Auth.Entities.SsoUser, SsoUser>().ReverseMap();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using AutoMapper;
|
||||
using Bit.Core.Repositories;
|
||||
using Bit.Infrastructure.EntityFramework.Models;
|
||||
using Bit.Infrastructure.EntityFramework.Auth.Models;
|
||||
using Bit.Infrastructure.EntityFramework.Repositories;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
using Bit.Core.Auth.Enums;
|
||||
using Bit.Core.Auth.Models.Data;
|
||||
using Bit.Core.Repositories;
|
||||
using Bit.Infrastructure.EntityFramework.Auth.Models;
|
||||
using Bit.Infrastructure.EntityFramework.Auth.Repositories.Queries;
|
||||
using Bit.Infrastructure.EntityFramework.Models;
|
||||
using Bit.Infrastructure.EntityFramework.Repositories;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using AutoMapper;
|
||||
using Bit.Core.Auth.Repositories;
|
||||
using Bit.Infrastructure.EntityFramework.Models;
|
||||
using Bit.Infrastructure.EntityFramework.Auth.Models;
|
||||
using Bit.Infrastructure.EntityFramework.Repositories;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Bit.Infrastructure.EntityFramework.Models;
|
||||
using Bit.Infrastructure.EntityFramework.Auth.Models;
|
||||
using Bit.Infrastructure.EntityFramework.Repositories;
|
||||
using Bit.Infrastructure.EntityFramework.Repositories.Queries;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using AutoMapper;
|
||||
using Bit.Core.Auth.Repositories;
|
||||
using Bit.Infrastructure.EntityFramework.Models;
|
||||
using Bit.Infrastructure.EntityFramework.Auth.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using AutoMapper;
|
||||
using Bit.Core.Auth.Repositories;
|
||||
using Bit.Infrastructure.EntityFramework.Models;
|
||||
using Bit.Infrastructure.EntityFramework.Auth.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user