SysDictDataSeedData.cs 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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 SysDictDataSeedData : IEntitySeedData<SysDictData>
  10. {
  11. /// <summary>
  12. /// 种子数据
  13. /// </summary>
  14. /// <param name="dbContext"></param>
  15. /// <param name="dbContextLocator"></param>
  16. /// <returns></returns>
  17. /// <exception cref="NotImplementedException"></exception>
  18. public IEnumerable<SysDictData> HasData(DbContext dbContext, Type dbContextLocator)
  19. {
  20. return new[]
  21. {
  22. // 通用状态
  23. new SysDictData { Id = 10100001, SysDictTypeId = 101, Value = 1, Name = "正常", Code = "enabled", Sort = 100, Status = CommonStatus.ENABLE, AntStatus = "success" },
  24. new SysDictData { Id = 10100002, SysDictTypeId = 101, Value = 2, Name = "停用", Code = "disabled", Sort = 100, Status = CommonStatus.ENABLE, AntStatus = "error" },
  25. new SysDictData { Id = 10100003, SysDictTypeId = 101, Value = 3, Name = "删除", Code = "deleted", Sort = 100, Status = CommonStatus.ENABLE, AntStatus = "default" },
  26. // 菜单类型
  27. new SysDictData { Id = 10200001, SysDictTypeId = 102, Value = 1, Name = "目录", Code = "folder", Sort = 100, Status = CommonStatus.ENABLE },
  28. new SysDictData { Id = 10200002, SysDictTypeId = 102, Value = 2, Name = "菜单", Code = "menu", Sort = 100, Status = CommonStatus.ENABLE },
  29. new SysDictData { Id = 10200003, SysDictTypeId = 102, Value = 3, Name = "按钮", Code = "button", Sort = 100, Status = CommonStatus.ENABLE },
  30. // 菜单打开方式
  31. new SysDictData { Id = 10300001, SysDictTypeId = 103, Value = 1, Name = "无", Code = "none", Sort = 100, Status = CommonStatus.ENABLE },
  32. new SysDictData { Id = 10300002, SysDictTypeId = 103, Value = 2, Name = "组件", Code = "component", Sort = 100, Status = CommonStatus.ENABLE },
  33. new SysDictData { Id = 10300003, SysDictTypeId = 103, Value = 3, Name = "内链", Code = "inner", Sort = 100, Status = CommonStatus.ENABLE },
  34. new SysDictData { Id = 10300004, SysDictTypeId = 103, Value = 4, Name = "外链", Code = "outer", Sort = 100, Status = CommonStatus.ENABLE },
  35. // 登录类型
  36. new SysDictData { Id = 10400001, SysDictTypeId = 104, Value = 1, Name = "登陆", Code = "loing", Sort = 100, Status = CommonStatus.ENABLE },
  37. new SysDictData { Id = 10400002, SysDictTypeId = 104, Value = 2, Name = "登出", Code = "logout", Sort = 100, Status = CommonStatus.ENABLE },
  38. new SysDictData { Id = 10400003, SysDictTypeId = 104, Value = 3, Name = "注册", Code = "register", Sort = 100, Status = CommonStatus.ENABLE },
  39. new SysDictData { Id = 10400004, SysDictTypeId = 104, Value = 4, Name = "修改密码", Code = "change_password", Sort = 100, Status = CommonStatus.ENABLE },
  40. new SysDictData { Id = 10400005, SysDictTypeId = 104, Value = 5, Name = "授权登录", Code = "authorized_login", Sort = 100, Status = CommonStatus.ENABLE },
  41. // 数据权限范围
  42. new SysDictData { Id = 10500000, SysDictTypeId = 105, Value = 0, Name = "无", Code = "none", Sort = 100, Status = CommonStatus.ENABLE },
  43. new SysDictData { Id = 10500001, SysDictTypeId = 105, Value = 1, Name = "仅本人", Code = "self", Sort = 100, Status = CommonStatus.ENABLE },
  44. new SysDictData { Id = 10500002, SysDictTypeId = 105, Value = 2, Name = "本部门", Code = "dept", Sort = 100, Status = CommonStatus.ENABLE },
  45. new SysDictData { Id = 10500003, SysDictTypeId = 105, Value = 3, Name = "全部", Code = "all", Sort = 100, Status = CommonStatus.ENABLE },
  46. // 用户类型
  47. new SysDictData { Id = 10600001, SysDictTypeId = 106, Value = 1, Name = "系统", Code = "system", Sort = 10, Status = CommonStatus.ENABLE },
  48. new SysDictData { Id = 10600002, SysDictTypeId = 106, Value = 2, Name = "教师", Code = "teacher", Sort = 20, Status = CommonStatus.ENABLE },
  49. new SysDictData { Id = 10600003, SysDictTypeId = 106, Value = 3, Name = "学生", Code = "student", Sort = 30, Status = CommonStatus.ENABLE },
  50. new SysDictData { Id = 10600004, SysDictTypeId = 106, Value = 4, Name = "家长", Code = "patriarch", Sort = 40, Status = CommonStatus.ENABLE },
  51. // 学生状态
  52. new SysDictData { Id = 10700001, SysDictTypeId = 107, Value = 1, Name = "正常", Code = "normal", Sort = 10, Status = CommonStatus.ENABLE },
  53. new SysDictData { Id = 10700002, SysDictTypeId = 107, Value = 2, Name = "休学", Code = "suspension", Sort = 20, Status = CommonStatus.ENABLE },
  54. new SysDictData { Id = 10700003, SysDictTypeId = 107, Value = 3, Name = "转学", Code = "transfer_school", Sort = 30, Status = CommonStatus.ENABLE },
  55. new SysDictData { Id = 10700004, SysDictTypeId = 107, Value = 4, Name = "转班", Code = "transfer_class", Sort = 40, Status = CommonStatus.ENABLE },
  56. new SysDictData { Id = 10700005, SysDictTypeId = 107, Value = 5, Name = "退学", Code = "drop_out", Sort = 50, Status = CommonStatus.ENABLE },
  57. new SysDictData { Id = 10700006, SysDictTypeId = 107, Value = 6, Name = "降级", Code = "grade_down", Sort = 60, Status = CommonStatus.ENABLE },
  58. new SysDictData { Id = 10700007, SysDictTypeId = 107, Value = 7, Name = "升级", Code = "grade_up", Sort = 70, Status = CommonStatus.ENABLE },
  59. // 数据导入模式
  60. new SysDictData { Id = 10800001, SysDictTypeId = 108, Value = 1, Name = "清空追加", Code = "clear_append", Sort = 10, Status = CommonStatus.ENABLE },
  61. new SysDictData { Id = 10800002, SysDictTypeId = 108, Value = 2, Name = "更新追加", Code = "update_append", Sort = 20, Status = CommonStatus.ENABLE },
  62. new SysDictData { Id = 10800003, SysDictTypeId = 108, Value = 3, Name = "仅追加", Code = "only_append", Sort = 30, Status = CommonStatus.ENABLE },
  63. // 审核状态
  64. new SysDictData { Id = 10900001, SysDictTypeId = 109, Value = 1, Name = "未提交", Code = "unsubmit", Sort = 10, Status = CommonStatus.ENABLE, AntStatus = "warning", AntColor = "#faad14" },
  65. new SysDictData { Id = 10900002, SysDictTypeId = 109, Value = 2, Name = "待审核", Code = "audit", Sort = 20, Status = CommonStatus.ENABLE, AntStatus = "processing", AntColor = "#1677ff" },
  66. new SysDictData { Id = 10900003, SysDictTypeId = 109, Value = 3, Name = "已通过", Code = "approved", Sort = 30, Status = CommonStatus.ENABLE, AntStatus = "success", AntColor = "#52c41a" },
  67. new SysDictData { Id = 10900004, SysDictTypeId = 109, Value = 4, Name = "已驳回", Code = "rejected", Sort = 40, Status = CommonStatus.ENABLE, AntStatus = "error", AntColor = "#ff4d4f" },
  68. new SysDictData { Id = 10900005, SysDictTypeId = 109, Value = 5, Name = "已反审", Code = "approve_cancelled", Sort = 50, Status = CommonStatus.ENABLE, AntStatus = "warning", AntColor = "#faad14" },
  69. // 学段
  70. new SysDictData { Id = 20100000, SysDictTypeId = 201, Value = 0, Name = "无", Code = "none", Sort = 0, Status = CommonStatus.ENABLE },
  71. new SysDictData { Id = 20100001, SysDictTypeId = 201, Value = 1, Name = "学前", Code = "pre_school_stage", Sort = 10, Status = CommonStatus.ENABLE },
  72. new SysDictData { Id = 20100002, SysDictTypeId = 201, Value = 2, Name = "小学", Code = "primary_school_stage", Sort = 20, Status = CommonStatus.ENABLE },
  73. new SysDictData { Id = 20100003, SysDictTypeId = 201, Value = 3, Name = "初中", Code = "junior_high_school_stage", Sort = 30, Status = CommonStatus.ENABLE },
  74. new SysDictData { Id = 20100004, SysDictTypeId = 201, Value = 4, Name = "高中", Code = "senior_high_school_stage", Sort = 40, Status = CommonStatus.ENABLE },
  75. // 学期类型
  76. new SysDictData { Id = 20200001, SysDictTypeId = 202, Value = 1, Name = "上学期", NickName = "秋季", Code = "first_semester", Sort = 10, Status = CommonStatus.ENABLE },
  77. new SysDictData { Id = 20200002, SysDictTypeId = 202, Value = 2, Name = "下学期", NickName = "春秋", Code = "second_semester", Sort = 20, Status = CommonStatus.ENABLE },
  78. // 监测期间类型
  79. new SysDictData { Id = 20300000, SysDictTypeId = 203, Value = 0, Name = "无", Code = "none", Sort = 0, Status = CommonStatus.ENABLE },
  80. new SysDictData { Id = 20300001, SysDictTypeId = 203, Value = 1, Name = "期末", Code = "final_exam", Sort = 10, Status = CommonStatus.ENABLE },
  81. new SysDictData { Id = 20300002, SysDictTypeId = 203, Value = 2, Name = "期中", Code = "mid_term_exam", Sort = 20, Status = CommonStatus.ENABLE },
  82. new SysDictData { Id = 20300003, SysDictTypeId = 203, Value = 3, Name = "平时", Code = "regular_exam", Sort = 30, Status = CommonStatus.ENABLE },
  83. // 监测状态
  84. new SysDictData { Id = 20400001, SysDictTypeId = 204, Value = 1, Name = "未开始", Code = "ready", Sort = 10, Status = CommonStatus.ENABLE, AntStatus = "error", AntColor = "#ff4d4f" },
  85. new SysDictData { Id = 20400002, SysDictTypeId = 204, Value = 2, Name = "进行中", Code = "active", Sort = 20, Status = CommonStatus.ENABLE, AntStatus = "processing", AntColor = "#1677ff" },
  86. new SysDictData { Id = 20400003, SysDictTypeId = 204, Value = 3, Name = "已结束", Code = "stopped", Sort = 30, Status = CommonStatus.ENABLE, AntStatus = "default", AntColor = "#00000025" },
  87. new SysDictData { Id = 20400004, SysDictTypeId = 204, Value = 4, Name = "已取消", Code = "cancelled", Sort = 40, Status = CommonStatus.ENABLE, AntStatus = "default", AntColor = "#00000025" },
  88. // 发布状态
  89. new SysDictData { Id = 20500001, SysDictTypeId = 205, Value = 1, Name = "未发布", Code = "unpublish", Sort = 10, Status = CommonStatus.ENABLE, AntStatus = "error", AntColor = "#ff4d4f" },
  90. new SysDictData { Id = 20500002, SysDictTypeId = 205, Value = 2, Name = "已发布", Code = "published", Sort = 20, Status = CommonStatus.ENABLE, AntStatus = "success", AntColor = "#52c41a" },
  91. new SysDictData { Id = 20500003, SysDictTypeId = 205, Value = 3, Name = "已取消", Code = "cancelled", Sort = 30, Status = CommonStatus.ENABLE, AntStatus = "default", AntColor = "#00000025" },
  92. // 数据上报状态
  93. new SysDictData { Id = 20600001, SysDictTypeId = 206, Value = 1, Name = "未上报", Code = "unreport", Sort = 10, Status = CommonStatus.ENABLE, AntStatus = "warning", AntColor = "#faad14" },
  94. new SysDictData { Id = 20600002, SysDictTypeId = 206, Value = 2, Name = "已退回", Code = "rejected", Sort = 20, Status = CommonStatus.ENABLE, AntStatus = "error", AntColor = "#ff4d4f" },
  95. new SysDictData { Id = 20600003, SysDictTypeId = 206, Value = 3, Name = "已上报", Code = "reported", Sort = 30, Status = CommonStatus.ENABLE, AntStatus = "success", AntColor = "#52c41a" },
  96. // 监测抽样类型
  97. new SysDictData { Id = 20700001, SysDictTypeId = 207, Value = 1, Name = "区测", Code = "center", Sort = 10, Status = CommonStatus.ENABLE },
  98. new SysDictData { Id = 20700002, SysDictTypeId = 207, Value = 2, Name = "校测", Code = "school", Sort = 20, Status = CommonStatus.ENABLE },
  99. // 监测类型
  100. new SysDictData { Id = 20800000, SysDictTypeId = 208, Value = 0, Name = "无", Code = "none", Sort = 0, Status = CommonStatus.ENABLE },
  101. new SysDictData { Id = 20800001, SysDictTypeId = 208, Value = 1, Name = "学业质量监测", Code = "academic_quality", Sort = 10, Status = CommonStatus.ENABLE },
  102. new SysDictData { Id = 20800002, SysDictTypeId = 208, Value = 2, Name = "教育质量监测", Code = "educational_quality", Sort = 20, Status = CommonStatus.ENABLE },
  103. // 数据上报类型
  104. new SysDictData { Id = 20900001, SysDictTypeId = 209, Value = 1, Name = "学生信息上报", Code = "student", Sort = 10, Status = CommonStatus.ENABLE },
  105. new SysDictData { Id = 20900002, SysDictTypeId = 209, Value = 2, Name = "特殊学生上报", Code = "sp_student", Sort = 20, Status = CommonStatus.ENABLE },
  106. new SysDictData { Id = 20900003, SysDictTypeId = 209, Value = 3, Name = "教师信息上报", Code = "teacher", Sort = 30, Status = CommonStatus.ENABLE },
  107. new SysDictData { Id = 20900004, SysDictTypeId = 209, Value = 4, Name = "教师科目上报", Code = "teacher_course", Sort = 40, Status = CommonStatus.ENABLE },
  108. new SysDictData { Id = 20900005, SysDictTypeId = 209, Value = 5, Name = "缺测替补上报", Code = "absent_replace", Sort = 50, Status = CommonStatus.ENABLE },
  109. new SysDictData { Id = 20900006, SysDictTypeId = 209, Value = 6, Name = "自测数据上报", Code = "school_exam", Sort = 60, Status = CommonStatus.ENABLE },
  110. // 数据发布类型
  111. new SysDictData { Id = 21000001, SysDictTypeId = 210, Value = 1, Name = "通知公告", Code = "notice", Sort = 10, Status = CommonStatus.ENABLE },
  112. new SysDictData { Id = 21000002, SysDictTypeId = 210, Value = 2, Name = "抽样名单", Code = "student_sample_list", Sort = 20, Status = CommonStatus.ENABLE },
  113. new SysDictData { Id = 21000003, SysDictTypeId = 210, Value = 3, Name = "问卷名单", Code = "questionnaire_list", Sort = 30, Status = CommonStatus.ENABLE },
  114. new SysDictData { Id = 21000004, SysDictTypeId = 210, Value = 4, Name = "监测成绩", Code = "exam_score", Sort = 40, Status = CommonStatus.ENABLE },
  115. new SysDictData { Id = 21000005, SysDictTypeId = 210, Value = 5, Name = "分析报表", Code = "analysis_report", Sort = 50, Status = CommonStatus.ENABLE },
  116. new SysDictData { Id = 21000006, SysDictTypeId = 210, Value = 6, Name = "监测报告", Code = "exam_report", Sort = 60, Status = CommonStatus.ENABLE },
  117. new SysDictData { Id = 21000007, SysDictTypeId = 210, Value = 7, Name = "问卷进度", Code = "questionnaire_progress", Sort = 70, Status = CommonStatus.ENABLE },
  118. new SysDictData { Id = 21000099, SysDictTypeId = 210, Value = 99, Name = "其他文件", Code = "other", Sort = 990, Status = CommonStatus.ENABLE },
  119. // 机构类型
  120. new SysDictData { Id = 30100001, SysDictTypeId = 301, Value = 1, Name = "中心", Code = "center", Sort = 10, Status = CommonStatus.ENABLE },
  121. new SysDictData { Id = 30100002, SysDictTypeId = 301, Value = 2, Name = "学区", Code = "district", Sort = 20, Status = CommonStatus.ENABLE },
  122. new SysDictData { Id = 30100003, SysDictTypeId = 301, Value = 3, Name = "学校", Code = "school", Sort = 30, Status = CommonStatus.ENABLE },
  123. new SysDictData { Id = 30100004, SysDictTypeId = 301, Value = 4, Name = "校区", Code = "school_branch", Sort = 40, Status = CommonStatus.ENABLE },
  124. // 办学性质
  125. new SysDictData { Id = 30200000, SysDictTypeId = 302, Value = 0, Name = "无", Code = "none", Sort = 0, Status = CommonStatus.ENABLE },
  126. new SysDictData { Id = 30200001, SysDictTypeId = 302, Value = 1, Name = "公办", Code = "public", Sort = 10, Status = CommonStatus.ENABLE, Remark = "国家机关、国家性的机构、组织,用国家对于教育的拨款、经费设计教育的机构,用的是国家的钱,登机的主体是按照事业法人进行登记的" },
  127. new SysDictData { Id = 30200002, SysDictTypeId = 302, Value = 2, Name = "公办性质", Code = "public_sub", Sort = 20, Status = CommonStatus.ENABLE, Remark = "主体用的不是国家的钱,可能是比较低级的乡村、村委会进行投资创办的,也有可能是一些集体的企业或者事业单位投资创建的,作为对于乡村、城市的建设等" },
  128. new SysDictData { Id = 30200003, SysDictTypeId = 302, Value = 3, Name = "民办", Code = "private", Sort = 30, Status = CommonStatus.ENABLE },
  129. // 城乡类别
  130. new SysDictData { Id = 30300000, SysDictTypeId = 303, Value = 0, Name = "无", Code = "none", Sort = 0, Status = CommonStatus.ENABLE },
  131. new SysDictData { Id = 30300001, SysDictTypeId = 303, Value = 1, Name = "城市", Code = "urban", Sort = 10, Status = CommonStatus.ENABLE },
  132. new SysDictData { Id = 30300002, SysDictTypeId = 303, Value = 2, Name = "农村", Code = "rural", Sort = 20, Status = CommonStatus.ENABLE },
  133. // 证件类型
  134. new SysDictData { Id = 30400000, SysDictTypeId = 304, Value = 0, Name = "无", Code = "none", Sort = 0, Status = CommonStatus.ENABLE },
  135. new SysDictData { Id = 30400001, SysDictTypeId = 304, Value = 1, Name = "居民身份证", Code = "id_card", Sort = 10, Status = CommonStatus.ENABLE },
  136. new SysDictData { Id = 30400006, SysDictTypeId = 304, Value = 6, Name = "香港特区护照", Code = "hk_passport", Sort = 60, Status = CommonStatus.ENABLE },
  137. new SysDictData { Id = 30400007, SysDictTypeId = 304, Value = 7, Name = "澳门特区护照", Code = "macao_passport", Sort = 70, Status = CommonStatus.ENABLE },
  138. new SysDictData { Id = 30400008, SysDictTypeId = 304, Value = 8, Name = "台湾居民来往大陆通行证", Code = "tw_travel_permits", Sort = 80, Status = CommonStatus.ENABLE },
  139. new SysDictData { Id = 30400009, SysDictTypeId = 304, Value = 9, Name = "境外永久居住证", Code = "overseas_permits", Sort = 90, Status = CommonStatus.ENABLE },
  140. new SysDictData { Id = 30400010, SysDictTypeId = 304, Value = 10, Name = "护照", Code = "passport", Sort = 100, Status = CommonStatus.ENABLE },
  141. new SysDictData { Id = 30400011, SysDictTypeId = 304, Value = 11, Name = "其他", Code = "other", Sort = 110, Status = CommonStatus.ENABLE },
  142. // 性别
  143. new SysDictData { Id = 30500000, SysDictTypeId = 305, Value = 0, Name = "未知", Code = "unknown", Sort = 0, Status = CommonStatus.ENABLE },
  144. new SysDictData { Id = 30500001, SysDictTypeId = 305, Value = 1, Name = "男", Code = "male", Sort = 10, Status = CommonStatus.ENABLE },
  145. new SysDictData { Id = 30500006, SysDictTypeId = 305, Value = 2, Name = "女", Code = "female", Sort = 20, Status = CommonStatus.ENABLE },
  146. // 职位
  147. new SysDictData { Id = 30600000, SysDictTypeId = 306, Value = 0, Name = "未知", Code = "unknown", Sort = 0, Status = CommonStatus.ENABLE },
  148. new SysDictData { Id = 30600001, SysDictTypeId = 306, Value = 1, Name = "校长", Code = "principal", Sort = 10, Status = CommonStatus.ENABLE },
  149. new SysDictData { Id = 30600002, SysDictTypeId = 306, Value = 2, Name = "副校长", Code = "vice_principal", Sort = 20, Status = CommonStatus.ENABLE },
  150. new SysDictData { Id = 30600003, SysDictTypeId = 306, Value = 3, Name = "书记", Code = "secretary", Sort = 30, Status = CommonStatus.ENABLE },
  151. new SysDictData { Id = 30600004, SysDictTypeId = 306, Value = 4, Name = "副书记", Code = "vice_secretary", Sort = 40, Status = CommonStatus.ENABLE },
  152. new SysDictData { Id = 30600005, SysDictTypeId = 306, Value = 5, Name = "教务主任", Code = "dean_academic_affairs", Sort = 50, Status = CommonStatus.ENABLE },
  153. new SysDictData { Id = 30600006, SysDictTypeId = 306, Value = 6, Name = "教务副主任", Code = "assistant_dean_academic_affairs", Sort = 60, Status = CommonStatus.ENABLE },
  154. new SysDictData { Id = 30600007, SysDictTypeId = 306, Value = 7, Name = "教师", Code = "teacher", Sort = 70, Status = CommonStatus.ENABLE },
  155. new SysDictData { Id = 30600008, SysDictTypeId = 306, Value = 8, Name = "行政", Code = "administer", Sort = 80, Status = CommonStatus.ENABLE },
  156. new SysDictData { Id = 30600009, SysDictTypeId = 306, Value = 9, Name = "后勤", Code = "logistics", Sort = 90, Status = CommonStatus.ENABLE },
  157. new SysDictData { Id = 30600099, SysDictTypeId = 306, Value = 99, Name = "其他", Code = "other", Sort = 990, Status = CommonStatus.ENABLE },
  158. };
  159. }
  160. }