SemesterSeedData.cs 4.3 KB

1234567891011121314151617181920212223242526272829303132
  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 SemesterSeedData : IEntitySeedData<Semester>
  10. {
  11. public IEnumerable<Semester> HasData(DbContext dbContext, Type dbContextLocator)
  12. {
  13. return new[]
  14. {
  15. new Semester { Id = 20172, BeginYear = 2017, EndYear = 2018, SemesterType = SemesterType.FIRST_SEMESTER, Name = "2017至2018学年上学期", ShortName = "2017~2018上", NickName = "2017至2018学年秋季学期", NickShortName = "2017秋", CreateSysUserId = 1, CreateTime = DateTime.Now },
  16. new Semester { Id = 20181, BeginYear = 2017, EndYear = 2018, SemesterType = SemesterType.SECOND_SEMESTER, Name = "2017至2018学年下学期", ShortName = "2017~2018下", NickName = "2017至2018学年春季学期", NickShortName = "2018春", CreateSysUserId = 1, CreateTime = DateTime.Now },
  17. new Semester { Id = 20182, BeginYear = 2018, EndYear = 2019, SemesterType = SemesterType.FIRST_SEMESTER, Name = "2018至2019学年上学期", ShortName = "2018~2019上", NickName = "2018至2019学年秋季学期", NickShortName = "2018秋", CreateSysUserId = 1, CreateTime = DateTime.Now },
  18. new Semester { Id = 20191, BeginYear = 2018, EndYear = 2019, SemesterType = SemesterType.SECOND_SEMESTER, Name = "2018至2019学年下学期", ShortName = "2018~2019下", NickName = "2018至2019学年春季学期", NickShortName = "2019春", CreateSysUserId = 1, CreateTime = DateTime.Now },
  19. new Semester { Id = 20192, BeginYear = 2019, EndYear = 2020, SemesterType = SemesterType.FIRST_SEMESTER, Name = "2019至2020学年上学期", ShortName = "2019~2020上", NickName = "2019至2020学年秋季学期", NickShortName = "2019秋", CreateSysUserId = 1, CreateTime = DateTime.Now },
  20. new Semester { Id = 20201, BeginYear = 2019, EndYear = 2020, SemesterType = SemesterType.SECOND_SEMESTER, Name = "2019至2020学年下学期", ShortName = "2019~2020下", NickName = "2019至2020学年春季学期", NickShortName = "2020春", CreateSysUserId = 1, CreateTime = DateTime.Now },
  21. new Semester { Id = 20202, BeginYear = 2020, EndYear = 2021, SemesterType = SemesterType.FIRST_SEMESTER, Name = "2020至2021学年上学期", ShortName = "2020~2021上", NickName = "2020至2021学年秋季学期", NickShortName = "2020秋", CreateSysUserId = 1, CreateTime = DateTime.Now },
  22. new Semester { Id = 20211, BeginYear = 2020, EndYear = 2021, SemesterType = SemesterType.SECOND_SEMESTER, Name = "2020至2021学年下学期", ShortName = "2020~2021下", NickName = "2020至2021学年春季学期", NickShortName = "2021春", CreateSysUserId = 1, CreateTime = DateTime.Now },
  23. new Semester { Id = 20212, BeginYear = 2021, EndYear = 2022, SemesterType = SemesterType.FIRST_SEMESTER, Name = "2021至2022学年上学期", ShortName = "2021~2022上", NickName = "2021至2022学年秋季学期", NickShortName = "2021秋", CreateSysUserId = 1, CreateTime = DateTime.Now },
  24. new Semester { Id = 20221, BeginYear = 2021, EndYear = 2022, SemesterType = SemesterType.SECOND_SEMESTER, Name = "2021至2022学年下学期", ShortName = "2021~2022下", NickName = "2021至2022学年春季学期", NickShortName = "2022春", CreateSysUserId = 1, CreateTime = DateTime.Now },
  25. new Semester { Id = 20222, BeginYear = 2022, EndYear = 2023, SemesterType = SemesterType.FIRST_SEMESTER, Name = "2022至2023学年上学期", ShortName = "2022~2023上", NickName = "2022至2023学年秋季学期", NickShortName = "2022秋", CreateSysUserId = 1, CreateTime = DateTime.Now },
  26. new Semester { Id = 20231, BeginYear = 2022, EndYear = 2023, SemesterType = SemesterType.SECOND_SEMESTER, Name = "2022至2023学年下学期", ShortName = "2022~2023下", NickName = "2022至2023学年春季学期", NickShortName = "2023春", CreateSysUserId = 1, CreateTime = DateTime.Now },
  27. new Semester { Id = 20232, BeginYear = 2023, EndYear = 2024, SemesterType = SemesterType.FIRST_SEMESTER, Name = "2023至2024学年上学期", ShortName = "2023~2024上", NickName = "2023至2024学年秋季学期", NickShortName = "2023秋", CreateSysUserId = 1, CreateTime = DateTime.Now },
  28. };
  29. }
  30. }