SysRoleGroupSeedData.cs 1.1 KB

1234567891011121314151617181920212223242526272829
  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 SysRoleGroupSeedData : IEntitySeedData<SysRoleGroup>
  10. {
  11. /// <summary>
  12. /// 种子数据
  13. /// </summary>
  14. /// <param name="dbContext"></param>
  15. /// <param name="dbContextLocator"></param>
  16. /// <returns></returns>
  17. public IEnumerable<SysRoleGroup> HasData(DbContext dbContext, Type dbContextLocator)
  18. {
  19. return new[]
  20. {
  21. new SysRoleGroup { Id = 1, Name = "默认", CreateSysUserId = 1, CreateTime = DateTime.Now, IsDeleted = false },
  22. new SysRoleGroup { Id = 2, Name = "中心角色", CreateSysUserId = 1, CreateTime = DateTime.Now, IsDeleted = false },
  23. new SysRoleGroup { Id = 3, Name = "学区角色", CreateSysUserId = 1, CreateTime = DateTime.Now, IsDeleted = false },
  24. new SysRoleGroup { Id = 4, Name = "学校角色", CreateSysUserId = 1, CreateTime = DateTime.Now, IsDeleted = false },
  25. };
  26. }
  27. }