using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using wispro.sp.entity;

namespace wispro.sp.datamap
{
    public class StaffGradeMap: IEntityTypeConfiguration<StaffGrade>
    {
        public void Configure(EntityTypeBuilder<StaffGrade> b)
        {
            //b.HasKey(o => o.Id);
            b.Property(e => e.Coefficient).HasColumnType("decimal(2, 1)");

            b.Property(e => e.Grade)
                .IsRequired()
                .HasMaxLength(5)
                .IsFixedLength(true);
        }
        
    }
}
