source/user.go
@@ -33,13 +33,13 @@ adminPassword := encrypt.BcryptHash("123456") entities := []*model.User{ { ID: fmt.Sprintf("u%v", snowflake.GenerateId()), UUID: fmt.Sprintf("u%v", snowflake.GenerateId()), Username: "admin", Password: adminPassword, NickName: "admin", UserType: constvar.UserTypeSuper, ParentId: "basic", // 超级管理员账户的父亲为空字符串,或者起个名字 Enable: true, //ParentId: "basic", // 超级管理员账户的父亲为空字符串,或者起个名字 //Enable: true, }, } if err = model.NewUserSearch(nil).CreateBatch(entities); err != nil {