using ODMO.Commons.DTOs.Digimon; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace ODMO.Infrastructure.ContextConfiguration.Digimon { public class DigimonLocationConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder .ToTable("Location", "Digimon") .HasKey(x => x.Id); builder .Property(x => x.MapId) .HasColumnType("smallint") .HasDefaultValue(0) .IsRequired(); builder .Property(x => x.X) .HasColumnType("int") .HasDefaultValue(5000) .IsRequired(); builder .Property(x => x.Y) .HasColumnType("int") .HasDefaultValue(4500) .IsRequired(); builder .Property(x => x.Z) .HasColumnType("numeric(9,2)") .HasDefaultValue(0) .IsRequired(); } } }