mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
DbGovor init
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using Govor.Core.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace Govor.Data.Configurations;
|
||||
|
||||
public class GroupMembershipConfiguration : IEntityTypeConfiguration<GroupMembership>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<GroupMembership> builder)
|
||||
{
|
||||
builder.HasKey(m => new { m.GroupId, m.UserId });
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Govor.Core.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace Govor.Data.Configurations;
|
||||
|
||||
public class UserConfiguration : IEntityTypeConfiguration<User>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<User> builder)
|
||||
{
|
||||
builder.HasKey(x => x.Id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user