NceeConvertGradeSeedData.cs 1.1 KB

123456789101112131415161718192021222324
  1. using Furion.DatabaseAccessor;
  2. using Microsoft.EntityFrameworkCore;
  3. using System;
  4. using System.Collections.Generic;
  5. namespace YBEE.EQM.Core.SeedData;
  6. /// <summary>
  7. /// 高中赋分转换等级种子数据
  8. /// </summary>
  9. public class NceeConvertGradeSeedData : IEntitySeedData<NceeConvertGrade>
  10. {
  11. public IEnumerable<NceeConvertGrade> HasData(DbContext dbContext, Type dbContextLocator)
  12. {
  13. return new[]
  14. {
  15. new NceeConvertGrade { Id = 1, Name = "A", Rate = 0.15M, BeginRate = 0M, EndRate = 0.15M, MinScore = 86M, MaxScore = 100M },
  16. new NceeConvertGrade { Id = 2, Name = "B", Rate = 0.35M, BeginRate = 0.15M, EndRate = 0.5M, MinScore = 71M, MaxScore = 85M },
  17. new NceeConvertGrade { Id = 3, Name = "C", Rate = 0.35M, BeginRate = 0.5M, EndRate = 0.85M, MinScore = 56M, MaxScore = 70M },
  18. new NceeConvertGrade { Id = 4, Name = "D", Rate = 0.13M, BeginRate = 0.85M, EndRate = 0.98M, MinScore = 41M, MaxScore = 55M },
  19. new NceeConvertGrade { Id = 5, Name = "E", Rate = 0.02M, BeginRate = 0.98M, EndRate = 1M, MinScore = 30M, MaxScore = 40M },
  20. };
  21. }
  22. }