CourseSeedData.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233
  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 CourseSeedData : IEntitySeedData<Course>
  10. {
  11. public IEnumerable<Course> HasData(DbContext dbContext, Type dbContextLocator)
  12. {
  13. return new[]
  14. {
  15. new Course { Id = 1, Name = "语文", ShortName = "语", NickName = "语文", Status = CommonStatus.ENABLE, CreateSysUserId = 1, CreateTime = DateTime.Now },
  16. new Course { Id = 2, Name = "数学", ShortName = "数", NickName = "数学", Status = CommonStatus.ENABLE, CreateSysUserId = 1, CreateTime = DateTime.Now },
  17. new Course { Id = 3, Name = "英语", ShortName = "英", NickName = "外语", Status = CommonStatus.ENABLE, CreateSysUserId = 1, CreateTime = DateTime.Now },
  18. new Course { Id = 4, Name = "物理", ShortName = "物", NickName = "物理", Status = CommonStatus.ENABLE, CreateSysUserId = 1, CreateTime = DateTime.Now },
  19. new Course { Id = 5, Name = "化学", ShortName = "化", NickName = "化学", Status = CommonStatus.ENABLE, CreateSysUserId = 1, CreateTime = DateTime.Now },
  20. new Course { Id = 6, Name = "生物", ShortName = "生", NickName = "生物", Status = CommonStatus.ENABLE, CreateSysUserId = 1, CreateTime = DateTime.Now },
  21. new Course { Id = 7, Name = "政治", ShortName = "政", NickName = "政治", Status = CommonStatus.ENABLE, CreateSysUserId = 1, CreateTime = DateTime.Now },
  22. new Course { Id = 8, Name = "历史", ShortName = "史", NickName = "历史", Status = CommonStatus.ENABLE, CreateSysUserId = 1, CreateTime = DateTime.Now },
  23. new Course { Id = 9, Name = "地理", ShortName = "地", NickName = "地理", Status = CommonStatus.ENABLE, CreateSysUserId = 1, CreateTime = DateTime.Now },
  24. new Course { Id = 31, Name = "德语", ShortName = "德", NickName = "外语", Status = CommonStatus.ENABLE, CreateSysUserId = 1, CreateTime = DateTime.Now },
  25. new Course { Id = 32, Name = "日语", ShortName = "日", NickName = "外语", Status = CommonStatus.ENABLE, CreateSysUserId = 1, CreateTime = DateTime.Now },
  26. new Course { Id = 99, Name = "未选科", ShortName = "未", NickName = "未选科", Status = CommonStatus.ENABLE, CreateSysUserId = 1, CreateTime = DateTime.Now },
  27. new Course { Id = 100, Name = "总分", ShortName = "总", NickName = "总分", Status = CommonStatus.ENABLE, CreateSysUserId = 1, CreateTime = DateTime.Now },
  28. new Course { Id = 101, Name = "综合", ShortName = "综", NickName = "科选2", Status = CommonStatus.ENABLE, CreateSysUserId = 1, CreateTime = DateTime.Now },
  29. };
  30. }
  31. }