2025-08-02 18:56:44 +02:00

33 lines
875 B
C#

using Liber_Incantamentum.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace Liber_Incantamentum.Infrastructure.Persistence.Configurations
{
public class MageConfiguration : IEntityTypeConfiguration<Mage>
{
public void Configure(EntityTypeBuilder<Mage> builder)
{
builder.ToTable("Mages");
builder.HasKey(m => m.Id);
builder.Property(m => m.Id)
.ValueGeneratedOnAdd();
builder.Property(m => m.Name)
.IsRequired()
.HasMaxLength(200);
builder.Property(m => m.Rank)
.IsRequired()
.HasMaxLength(200);
builder.Property(m => m.Specialisation)
.IsRequired()
.HasMaxLength(200);
}
}
}