6824d7ce7d
🚀 Create and publish a Docker image / Detect changes in backend and frontend (push) Successful in 9s
🚀 Create and publish a Docker image / Build & publish backend image (push) Successful in 2m6s
🚀 Create and publish a Docker image / Build & publish frontend image (push) Successful in 26s
🚀 Create and publish a Docker image / Update stack on Portainer (push) Successful in 6s
18 lines
591 B
C#
18 lines
591 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
using UniVerse.Domain.Entities;
|
|
|
|
namespace UniVerse.Infrastructure.Data.Configurations;
|
|
|
|
public class UserRoleAssignmentConfiguration : IEntityTypeConfiguration<UserRoleAssignment>
|
|
{
|
|
public void Configure(EntityTypeBuilder<UserRoleAssignment> builder)
|
|
{
|
|
builder.ToTable("user_roles");
|
|
|
|
builder.HasKey(ur => new { ur.UserId, ur.Role });
|
|
builder.Property(ur => ur.UserId).HasColumnName("user_id");
|
|
builder.Property(ur => ur.Role).HasColumnName("role");
|
|
}
|
|
}
|