mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
[AC-2972] AC Team ownership: Events (2/2) (#4675)
This commit is contained in:
@ -0,0 +1,21 @@
|
||||
using Bit.Infrastructure.EntityFramework.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace Bit.Infrastructure.EntityFramework.Configurations;
|
||||
|
||||
public class EventEntityTypeConfiguration : IEntityTypeConfiguration<Event>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Event> builder)
|
||||
{
|
||||
builder
|
||||
.Property(e => e.Id)
|
||||
.ValueGeneratedNever();
|
||||
|
||||
builder
|
||||
.HasIndex(e => new { e.Date, e.OrganizationId, e.ActingUserId, e.CipherId })
|
||||
.IsClustered(false);
|
||||
|
||||
builder.ToTable(nameof(Event));
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using AutoMapper;
|
||||
|
||||
namespace Bit.Infrastructure.EntityFramework.Models;
|
||||
|
||||
public class Event : Core.Entities.Event
|
||||
{
|
||||
}
|
||||
|
||||
public class EventMapperProfile : Profile
|
||||
{
|
||||
public EventMapperProfile()
|
||||
{
|
||||
CreateMap<Core.Entities.Event, Event>().ReverseMap();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user