|
@ -59,6 +59,32 @@ public class IdentityDbSeed : IDbSeed<IdentityDbContext> |
|
|
// 权限初始化
|
|
|
// 权限初始化
|
|
|
InitPermissions(context); |
|
|
InitPermissions(context); |
|
|
|
|
|
|
|
|
|
|
|
//岗位初始化
|
|
|
|
|
|
context.Set<Post>().Add(new Post |
|
|
|
|
|
{ |
|
|
|
|
|
Name = "董事长", |
|
|
|
|
|
Number = "001", |
|
|
|
|
|
Order = 1, |
|
|
|
|
|
}.SetIdBy(o => o.Number)); |
|
|
|
|
|
context.Set<Post>().Add(new Post |
|
|
|
|
|
{ |
|
|
|
|
|
Name = "项目经理", |
|
|
|
|
|
Number = "002", |
|
|
|
|
|
Order = 2 |
|
|
|
|
|
}.SetIdBy(o => o.Number)); |
|
|
|
|
|
context.Set<Post>().Add(new Post |
|
|
|
|
|
{ |
|
|
|
|
|
Name = "人力资源", |
|
|
|
|
|
Number = "003", |
|
|
|
|
|
Order = 3 |
|
|
|
|
|
}.SetIdBy(o => o.Number)); |
|
|
|
|
|
context.Set<Post>().Add(new Post |
|
|
|
|
|
{ |
|
|
|
|
|
Name = "普通员工", |
|
|
|
|
|
Number = "004", |
|
|
|
|
|
Order = 4 |
|
|
|
|
|
}.SetIdBy(o => o.Number)); |
|
|
|
|
|
|
|
|
//部门初始化
|
|
|
//部门初始化
|
|
|
context.Set<Department>().Add( |
|
|
context.Set<Department>().Add( |
|
|
new Department |
|
|
new Department |
|
|