Added configurations for entity builders. Also added VoiceWorkLocaalization entity.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using JSMR.Domain.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace JSMR.Infrastructure.Data.Configuration;
|
||||
|
||||
public sealed class CreatorConfiguration : IEntityTypeConfiguration<Creator>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Creator> builder)
|
||||
{
|
||||
builder.ToTable("creators");
|
||||
builder.HasKey(x => x.CreatorId);
|
||||
|
||||
builder.Property(x => x.Name).IsRequired().HasMaxLength(128);
|
||||
|
||||
builder.HasIndex(x => x.Name);
|
||||
builder.HasIndex(x => x.Favorite);
|
||||
builder.HasIndex(x => x.Blacklisted);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user