using ODMO.Commons.DTOs.Character; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace ODMO.Infrastructure.ContextConfiguration.Character { public class CharacterBuffConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder .ToTable("Buff", "Character") .HasKey(x => x.Id); builder .Property(x => x.BuffId) .HasColumnType("int") .HasDefaultValue(0) .IsRequired(); builder .Property(x => x.Duration) .HasColumnType("int") .HasDefaultValue(0) .IsRequired(); builder .Property(x => x.TypeN) .HasColumnType("int") .HasDefaultValue(0) .IsRequired(); builder .Property(x => x.SkillId) .HasColumnType("int") .HasDefaultValue(0) .IsRequired(); builder .Property(x => x.EndDate) .HasColumnType("datetime2") .HasDefaultValueSql("getdate()") .IsRequired(); } } }