DbGovor init

This commit is contained in:
Artemy
2025-06-16 22:31:45 +07:00
parent c7c778ceb1
commit d62c38db51
25 changed files with 613 additions and 36 deletions
@@ -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);
}
}