Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • J jz-api-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • jizhi-backend
  • jz-api-core
  • Wiki
  • Home

Home · Changes

Page history
xigua created page: home authored Jul 06, 2017 by xigua's avatar xigua
Hide whitespace changes
Inline Side-by-side
Showing with 19 additions and 1 deletion
+19 -1
  • home.md home.md +19 -1
  • No files found.
home.md
View page @ 8772b10b
......@@ -4,9 +4,27 @@
* Logger - Log服务
* Mongo - Mongo数据库的schema定义,一般不需要直接使用
* CacheService - 一般DBService内部调用
* Common - 通用的一些对象的申明
* Lib - 一些常用方法库
* AuthService - 权限校验服务,一般不用直接调用
* EntityResolver - 生成的Graphql调用的方法,一般不直接调用
* Hooks - 一般不直接使用
#
\ No newline at end of file
# Common
* 定义了一些和config文件对应的对象类型,一般不需要直接使用。有帮助的一些对象如下
* Entity - 所有数据库对象的基础,默认包含6个缺省的字段
1. _id
2. createdAt - 创建时间的timestamp(毫秒)
3. createdBy - 创建用户的id
4. updatedAt - 最近一次更改时间的timestamp(毫秒)
5. updatedBy - 最近一次更改人的id
6. isRemove - true表示该记录被标记为删除,整个系统只有软删除,缺省值为false
* MutationResult - graphql mutation的结果
1. success - 是否操作成功
2. error - 如有错误则包含错误信息
* MutationSuccess - 上面MutationResult的一个实例,返回{success: true}
* Me - 当前登录用户的信息,默认只包含两个field,这个信息由框架在用户登录的时候自动填写
1. id - 用户的id
2. role - 当前用户的角色
* SysAdmin - 上面Me的一个实例,用于指代系统管理员,用户比如cron job中创建临时Context时设置Me信息
* AnonymousUser - Me的另一个实例
\ No newline at end of file
Clone repository
  • Home
  • jz backend project skeleton