部门种子数据

This commit is contained in:
橙子
2022-09-25 18:58:17 +08:00
parent 8ef2c12be1
commit b665ec5717
11 changed files with 633 additions and 4 deletions

View File

@@ -24,6 +24,9 @@ namespace Yi.Framework.WebCore.DbExtend
var roles = SeedFactory.GetRoleSeed();
var menus = SeedFactory.GetMenuSeed();
var dicts= SeedFactory.GetDictionarySeed();
var posts = SeedFactory.GetPostSeed();
var dictinfos= SeedFactory.GetDictionaryInfoSeed();
var depts = SeedFactory.GetDeptSeed();
if (!_Db.Queryable<UserEntity>().Any())
{
_Db.Insertable(users).ExecuteCommand();
@@ -43,6 +46,20 @@ namespace Yi.Framework.WebCore.DbExtend
{
_Db.Insertable(dicts).ExecuteCommand();
}
if (!_Db.Queryable<PostEntity>().Any())
{
_Db.Insertable(posts).ExecuteCommand();
}
if (!_Db.Queryable<DictionaryInfoEntity>().Any())
{
_Db.Insertable(dictinfos).ExecuteCommand();
}
if (!_Db.Queryable<DeptEntity>().Any())
{
_Db.Insertable(depts).ExecuteCommand();
}
if (!_Db.Queryable<UserRoleEntity>().Any())
{