Yi.Framework.Net6/Yi.Framework.Model/SeedData/SeedFactory.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Model.Models;
namespace Yi.Framework.Model.SeedData
{
public class SeedFactory
{
public static List<UserEntity> GetUserSeed()
{
return new UserSeed().GetSeed();
}
public static List<RoleEntity> GetRoleSeed()
{
return new RoleSeed().GetSeed();
}
public static List<MenuEntity> GetMenuSeed()
{
return new MenuSeed().GetSeed();
}
public static List<DictionaryEntity> GetDictionarySeed()
{
return new DictionarySeed().GetSeed();
}
public static List<PostEntity> GetPostSeed()
{
return new PostSeed().GetSeed();
}
public static List<DictionaryInfoEntity> GetDictionaryInfoSeed()
{
return new DictionaryInfoSeed().GetSeed();
}
public static List<DeptEntity> GetDeptSeed()
{
return new DeptSeed().GetSeed();
}
public static List<FileEntity> GetFileSeed()
{
return new FileSeed().GetSeed();
}
public static List<UserRoleEntity> GetUserRoleSeed(List<UserEntity> users, List<RoleEntity> roles)
{
List<UserRoleEntity> userRoleEntities = new();
foreach (var u in users)
{
foreach (var r in roles)
{
userRoleEntities.Add(new UserRoleEntity() {Id= SnowFlakeSingle.Instance.NextId(),UserId = u.Id, RoleId = r.Id, IsDeleted = false });
}
}
return userRoleEntities;
}
后面还有 14 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
