mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
Stub out EF repo base with user repo
This commit is contained in:
17
src/Core/Models/EntityFramework/Cipher.cs
Normal file
17
src/Core/Models/EntityFramework/Cipher.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using AutoMapper;
|
||||
|
||||
namespace Bit.Core.Models.EntityFramework
|
||||
{
|
||||
public class Cipher : Table.Cipher
|
||||
{
|
||||
public User User { get; set; }
|
||||
}
|
||||
|
||||
public class CipherMapperProfile : Profile
|
||||
{
|
||||
public CipherMapperProfile()
|
||||
{
|
||||
CreateMap<Table.Cipher, Cipher>();
|
||||
}
|
||||
}
|
||||
}
|
18
src/Core/Models/EntityFramework/User.cs
Normal file
18
src/Core/Models/EntityFramework/User.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System.Collections.Generic;
|
||||
using AutoMapper;
|
||||
|
||||
namespace Bit.Core.Models.EntityFramework
|
||||
{
|
||||
public class User : Table.User
|
||||
{
|
||||
public ICollection<Cipher> Ciphers { get; set; }
|
||||
}
|
||||
|
||||
public class UserMapperProfile : Profile
|
||||
{
|
||||
public UserMapperProfile()
|
||||
{
|
||||
CreateMap<Table.User, User>();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user