作者 yangfu

修改依赖以及dsl文件

正在显示 100 个修改的文件 包含 1516 行增加0 行删除

要显示太多修改。

为保证性能只显示 100 of 100+ 个文件。

  1 +version: v1
  2 +kind: HttpApi
  3 +metadata:
  4 + service: auth
  5 + path: /auth
  6 + endpoints:
  7 + - method: login
  8 + route:
  9 + post: /login
  10 + - method: profile
  11 + route:
  12 + post: /profile
  13 + - method: refresh
  14 + route:
  15 + post: /refresh
  1 +version: v1
  2 +kind: HttpApi
  3 +metadata:
  4 + service: clientVersion
  5 + path: /client-versions
  6 + endpoints:
  7 + - method: createClientVersion
  8 + route:
  9 + post: /
  10 + - method: updateClientVersion
  11 + route:
  12 + put: /{id}
  13 + - method: getClientVersion
  14 + route:
  15 + get: /{id}
  16 + - method: removeClientVersion
  17 + route:
  18 + delete: /{id}
  19 + - method: listClientVersion
  20 + route:
  21 + get: /
  22 + params:
  23 + - name: offset
  24 + - name: limit
  1 +version: v1
  2 +kind: HttpApi
  3 +metadata:
  4 + service: projectModule
  5 + path: /project-modules
  6 + endpoints:
  7 + - method: createProjectModule
  8 + route:
  9 + post: /
  10 + - method: updateProjectModule
  11 + route:
  12 + put: /{projectModuleId}
  13 + - method: getProjectModule
  14 + route:
  15 + get: /{projectModuleId}
  16 + - method: removeProjectModule
  17 + route:
  18 + delete: /{projectModuleId}
  19 + - method: listProjectModule
  20 + route:
  21 + get: /
  22 + params:
  23 + - name: offset
  24 + - name: limit
  1 +version: v1
  2 +kind: HttpApi
  3 +metadata:
  4 + service: projectModuleFiles
  5 + path: /project-module-filess
  6 + endpoints:
  7 + - method: createProjectModuleFiles
  8 + route:
  9 + post: /
  10 + - method: updateProjectModuleFiles
  11 + route:
  12 + put: /{projectModuleFilesId}
  13 + - method: getProjectModuleFiles
  14 + route:
  15 + get: /{projectModuleFilesId}
  16 + - method: removeProjectModuleFiles
  17 + route:
  18 + delete: /{projectModuleFilesId}
  19 + - method: listProjectModuleFiles
  20 + route:
  21 + get: /
  22 + params:
  23 + - name: offset
  24 + - name: limit
  1 +version: v1
  2 +kind: HttpApi
  3 +metadata:
  4 + service: projectModuleVersion
  5 + path: /project-module-versions
  6 + endpoints:
  7 + - method: createProjectModuleVersion
  8 + route:
  9 + post: /
  10 + - method: updateProjectModuleVersion
  11 + route:
  12 + put: /{projectModuleVersionId}
  13 + - method: getProjectModuleVersion
  14 + route:
  15 + get: /{projectModuleVersionId}
  16 + - method: removeProjectModuleVersion
  17 + route:
  18 + delete: /{projectModuleVersionId}
  19 + - method: listProjectModuleVersion
  20 + route:
  21 + get: /
  22 + params:
  23 + - name: offset
  24 + - name: limit
  1 +version: v1
  2 +kind: HttpApi
  3 +metadata:
  4 + service: rbac
  5 + path: /rbacs
  6 + endpoints:
  7 + - method: access
  8 + route:
  9 + get: /access
  10 + - method: roleAccess
  11 + route:
  12 + get: /roleAccess/{roleId}
  13 + - method: setRoleAccess
  14 + route:
  15 + post: /setRoleAccess
  1 +version: v1
  2 +kind: HttpApi
  3 +metadata:
  4 + service: role
  5 + path: /roles
  6 + endpoints:
  7 + - method: createRole
  8 + route:
  9 + post: /
  10 + - method: updateRole
  11 + route:
  12 + put: /{Id}
  13 + - method: getRole
  14 + route:
  15 + get: /{Id}
  16 + - method: removeRole
  17 + route:
  18 + delete: /{Id}
  19 + - method: listRole
  20 + route:
  21 + get: /
  22 + params:
  23 + - name: offset
  24 + - name: limit
  1 +version: v1
  2 +kind: HttpApi
  3 +metadata:
  4 + service: task
  5 + path: /tasks
  6 + endpoints:
  7 + - method: createTask
  8 + route:
  9 + post: /
  10 + - method: updateTask
  11 + route:
  12 + put: /{taskId}
  13 + - method: getTask
  14 + route:
  15 + get: /{taskId}
  16 + - method: removeTask
  17 + route:
  18 + delete: /{taskId}
  19 + - method: listTask
  20 + route:
  21 + get: /
  22 + params:
  23 + - name: offset
  24 + - name: limit
  1 +version: v1
  2 +kind: HttpApi
  3 +metadata:
  4 + service: users
  5 + path: /users
  6 + endpoints:
  7 + - method: createUsers
  8 + route:
  9 + post: /
  10 + - method: updateUsers
  11 + route:
  12 + put: /{Id}
  13 + - method: getUsers
  14 + route:
  15 + get: /{Id}
  16 + - method: removeUsers
  17 + route:
  18 + delete: /{Id}
  19 + - method: listUsers
  20 + route:
  21 + get: /
  22 + params:
  23 + - name: offset
  24 + - name: limit
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: AccessCode
  5 + description: 权限名称
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: AccessName
  5 + description: 权限名称
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: AccessType
  5 + description: 权限类型 menu button data
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: Action
  5 + description: 操作方法 httpMethod/read/write
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: Icon
  5 + description: 图标
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: Module
  5 + description: 所属功能模块
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: Object
  5 + description: 请求对象 接口地址/对象
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: Option
  5 + description: 可选对象
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: Status
  5 + description: 状态 1-启用 0-禁用
  6 + type:
  7 + primitive: int
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: accessToken
  5 + description: 权限token
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: expiresIn
  5 + description: accessToken 过期时间
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: refreshToken
  5 + description: 刷新token
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: CreateTime
  5 + description: 创建时间
  6 + type:
  7 + primitive: datetime
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: Id
  5 + description: dcc
  6 + type:
  7 + primitive: int64
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: Name
  5 + description: 名称
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: ParentId
  5 + description: 父级Id
  6 + type:
  7 + primitive: int64
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: Sort
  5 + description: 排序
  6 + type:
  7 + primitive: int
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: UpdateTime
  5 + description: 更新时间
  6 + type:
  7 + primitive: datetime
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: aa
  5 + description: test
  6 + type:
  7 + primitive: int
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: description
  5 + description: 描述信息
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: sortById
  5 + description: cvdfgadgdfg
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: status
  5 + description: 状态 1:正常 2:删除
  6 + type:
  7 + primitive: int
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: count
  5 + description: 匹配数目
  6 + type:
  7 + primitive: int64
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: limit
  5 + description: 查询限制
  6 + type:
  7 + primitive: int
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: offset
  5 + description: 查询偏离量
  6 + type:
  7 + primitive: int
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: projectKey
  5 + description: 项目唯一键值
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: projectName
  5 + description: 项目名称
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: version
  5 + description: 项目编号
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: codeBlock
  5 + description: 代码块
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: fileKey
  5 + description: 文件键值
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: fileName
  5 + description: 文件名称
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: fileType
  5 + description: 文件类型 1:文件夹 2:文件
  6 + type:
  7 + primitive: int
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: path
  5 + description: 当前文件相对路径 a/b/c
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: tag
  5 + description: 标签
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: RoleName
  5 + description: 角色名称
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: AccessId
  5 + description: 权限编号
  6 + type:
  7 + primitive: int64
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: RoleId
  5 + description: 角色id
  6 + type:
  7 + primitive: int64
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: projectModuleFilesId
  5 + description: 项目文件编号
  6 + type:
  7 + primitive: int64
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: projectModuleId
  5 + description: 项目编号
  6 + type:
  7 + primitive: int64
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: projectModuleVersionId
  5 + description: 项目版本编号
  6 + type:
  7 + primitive: int64
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: usersId
  5 + description: user - id
  6 + type:
  7 + primitive: int64
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: taskId
  5 + description: 任务编号
  6 + type:
  7 + primitive: int64
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: taskName
  5 + description: 任务名称
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: AdminType
  5 + description: 1:管理员 2:普通员工
  6 + type:
  7 + primitive: int
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: Passwd
  5 + description: 密码
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: Phone
  5 + description: 手机号
  6 + type:
  7 + primitive: string
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: Roles
  5 + description: 用户角色
  6 + type:
  7 + array: int64
  1 +version: v1
  2 +kind: Attribute
  3 +metadata:
  4 + name: Status
  5 + description: 1:启用 2:禁用
  6 + type:
  7 + primitive: int
  1 +
  2 +func CreateAccessRepository(options map[string]interface{}) (domain.AccessRepository, error) {
  3 + var transactionContext *pg.TransactionContext
  4 + if value, ok := options["transactionContext"]; ok {
  5 + transactionContext = value.(*pg.TransactionContext)
  6 + }
  7 + return repository.NewAccessRepository(transactionContext)
  8 +}
  9 +func CreateAccessRepository(options map[string]interface{}) (domain.AccessRepository, error) {
  10 + var transactionContext *pg.TransactionContext
  11 + if value, ok := options["transactionContext"]; ok {
  12 + transactionContext = value.(*pg.TransactionContext)
  13 + }
  14 + return repository.NewAccessRepository(transactionContext)
  15 +}
  16 +func CreateAccessRepository(options map[string]interface{}) (domain.AccessRepository, error) {
  17 + var transactionContext *pg.TransactionContext
  18 + if value, ok := options["transactionContext"]; ok {
  19 + transactionContext = value.(*pg.TransactionContext)
  20 + }
  21 + return repository.NewAccessRepository(transactionContext)
  22 +}
  1 +package domain
  2 +
  3 +// 权限
  4 +type Access struct {
  5 + // dcc
  6 + Id int64 `json:"id"`
  7 + // 父级Id
  8 + ParentId int64 `json:"parentId"`
  9 + // 权限名称
  10 + AccessName string `json:"accessName"`
  11 + // 权限名称
  12 + AccessCode string `json:"accessCode"`
  13 + // 权限类型 menu button data
  14 + AccessType string `json:"accessType"`
  15 + // 排序
  16 + Sort int `json:"sort"`
  17 + // 请求对象 接口地址/对象
  18 + Object string `json:"object"`
  19 + // 操作方法 httpMethod/read/write
  20 + Action string `json:"action"`
  21 + // 所属功能模块
  22 + Module string `json:"module"`
  23 + // 图标
  24 + Icon string `json:"icon"`
  25 + // 状态 1-启用 0-禁用
  26 + Status int `json:"status"`
  27 +}
  28 +
  29 +type AccessRepository interface {
  30 + Save(access *Access) (*Access, error)
  31 + Remove(access *Access) (*Access, error)
  32 + FindOne(queryOptions map[string]interface{}) (*Access, error)
  33 + Find(queryOptions map[string]interface{}) (int64, []*Access, error)
  34 +}
  35 +
  36 +func (access *Access) Identify() interface{} {
  37 + if access.Id == 0 {
  38 + return nil
  39 + }
  40 + return access.Id
  41 +}
  42 +
  43 +func (access *Access) Update(data map[string]interface{}) error {
  44 + if Id, ok := data["Id"]; ok {
  45 + access.Id = Id.(int64)
  46 + }
  47 + if ParentId, ok := data["ParentId"]; ok {
  48 + access.ParentId = ParentId.(int64)
  49 + }
  50 + if AccessName, ok := data["AccessName"]; ok {
  51 + access.AccessName = AccessName.(string)
  52 + }
  53 + if AccessCode, ok := data["AccessCode"]; ok {
  54 + access.AccessCode = AccessCode.(string)
  55 + }
  56 + if AccessType, ok := data["AccessType"]; ok {
  57 + access.AccessType = AccessType.(string)
  58 + }
  59 + if Sort, ok := data["Sort"]; ok {
  60 + access.Sort = Sort.(int)
  61 + }
  62 + if Object, ok := data["Object"]; ok {
  63 + access.Object = Object.(string)
  64 + }
  65 + if Action, ok := data["Action"]; ok {
  66 + access.Action = Action.(string)
  67 + }
  68 + if Module, ok := data["Module"]; ok {
  69 + access.Module = Module.(string)
  70 + }
  71 + if Icon, ok := data["Icon"]; ok {
  72 + access.Icon = Icon.(string)
  73 + }
  74 + if Status, ok := data["Status"]; ok {
  75 + access.Status = Status.(int)
  76 + }
  77 + return nil
  78 +}
  1 +package models
  2 +
  3 +type Access struct {
  4 + TableName string `pg:"accesss,alias:access"`
  5 + // dcc
  6 + Id int64
  7 + // 父级Id
  8 + ParentId int64
  9 + // 权限名称
  10 + AccessName string
  11 + // 权限名称
  12 + AccessCode string
  13 + // 权限类型 menu button data
  14 + AccessType string
  15 + // 排序
  16 + Sort int
  17 + // 请求对象 接口地址/对象
  18 + Object string
  19 + // 操作方法 httpMethod/read/write
  20 + Action string
  21 + // 所属功能模块
  22 + Module string
  23 + // 图标
  24 + Icon string
  25 + // 状态 1-启用 0-禁用
  26 + Status int
  27 +}
  1 +package repository
  2 +
  3 +import (
  4 + "fmt"
  5 +
  6 + "github.com/go-pg/pg"
  7 + pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
  8 + "github.com/tiptok/godevp/pkg/domain"
  9 + "github.com/tiptok/godevp/pkg/infrastructure/pg/models"
  10 +)
  11 +
  12 +type AccessRepository struct {
  13 + transactionContext *pgTransaction.TransactionContext
  14 +}
  15 +
  16 +func (repository *AccessRepository) nextIdentify() (int64, error) {
  17 + return 0, nil
  18 +}
  19 +func (repository *AccessRepository) Save(access *domain.Access) (*domain.Access, error) {
  20 + tx := repository.transactionContext.PgTx
  21 + if access.Identify() == nil {
  22 + _, err := repository.nextIdentify()
  23 + if err != nil {
  24 + return access, err
  25 + }
  26 + if _, err := tx.QueryOne(
  27 + pg.Scan(&access.Id, &access.ParentId, &access.AccessName, &access.AccessCode, &access.AccessType, &access.Sort, &access.Object, &access.Action, &access.Module, &access.Icon, &access.Status),
  28 + "INSERT INTO accesss (id, parent_id, access_name, access_code, access_type, sort, object, action, module, icon, status) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id, parent_id, access_name, access_code, access_type, sort, object, action, module, icon, status",
  29 + access.Id, access.ParentId, access.AccessName, access.AccessCode, access.AccessType, access.Sort, access.Object, access.Action, access.Module, access.Icon, access.Status); err != nil {
  30 + return access, err
  31 + }
  32 + } else {
  33 + if _, err := tx.QueryOne(
  34 + pg.Scan(&access.Id, &access.ParentId, &access.AccessName, &access.AccessCode, &access.AccessType, &access.Sort, &access.Object, &access.Action, &access.Module, &access.Icon, &access.Status),
  35 + "UPDATE accesss SET id=?, parent_id=?, access_name=?, access_code=?, access_type=?, sort=?, object=?, action=?, module=?, icon=?, status=? WHERE id=? RETURNING id, parent_id, access_name, access_code, access_type, sort, object, action, module, icon, status",
  36 + access.Id, access.ParentId, access.AccessName, access.AccessCode, access.AccessType, access.Sort, access.Object, access.Action, access.Module, access.Icon, access.Status, access.Identify()); err != nil {
  37 + return access, err
  38 + }
  39 + }
  40 + return access, nil
  41 +}
  42 +func (repository *AccessRepository) Remove(access *domain.Access) (*domain.Access, error) {
  43 + tx := repository.transactionContext.PgTx
  44 + accessModel := new(models.Access)
  45 + accessModel.Id = access.Identify().(int64)
  46 + if _, err := tx.Model(accessModel).WherePK().Delete(); err != nil {
  47 + return access, err
  48 + }
  49 + return access, nil
  50 +}
  51 +func (repository *AccessRepository) FindOne(queryOptions map[string]interface{}) (*domain.Access, error) {
  52 + tx := repository.transactionContext.PgTx
  53 + accessModel := new(models.Access)
  54 + query := tx.Model(accessModel)
  55 + if accessId, ok := queryOptions["accessId"]; ok {
  56 + query = query.Where("access.id = ?", accessId)
  57 + }
  58 + if err := query.First(); err != nil {
  59 + if err.Error() == "pg: no rows in result set" {
  60 + return nil, fmt.Errorf("没有此资源")
  61 + } else {
  62 + return nil, err
  63 + }
  64 + }
  65 + if accessModel.Id == 0 {
  66 + return nil, nil
  67 + } else {
  68 + return repository.transformPgModelToDomainModel(accessModel)
  69 + }
  70 +}
  71 +func (repository *AccessRepository) Find(queryOptions map[string]interface{}) (int64, []*domain.Access, error) {
  72 + tx := repository.transactionContext.PgTx
  73 + var accessModels []*models.Access
  74 + accesss := make([]*domain.Access, 0)
  75 + query := tx.Model(&accessModels)
  76 + if offset, ok := queryOptions["offset"]; ok {
  77 + offset := offset.(int)
  78 + if offset > -1 {
  79 + query = query.Offset(offset)
  80 + }
  81 + } else {
  82 + query = query.Offset(0)
  83 + }
  84 + if limit, ok := queryOptions["limit"]; ok {
  85 + limit := limit.(int)
  86 + if limit > -1 {
  87 + query = query.Limit(limit)
  88 + }
  89 + } else {
  90 + query = query.Limit(20)
  91 + }
  92 + if count, err := query.Order("id DESC").SelectAndCount(); err != nil {
  93 + return 0, accesss, err
  94 + } else {
  95 + for _, accessModel := range accessModels {
  96 + if access, err := repository.transformPgModelToDomainModel(accessModel); err != nil {
  97 + return 0, accesss, err
  98 + } else {
  99 + accesss = append(accesss, access)
  100 + }
  101 + }
  102 + return int64(count), accesss, nil
  103 + }
  104 +}
  105 +func (repository *AccessRepository) transformPgModelToDomainModel(accessModel *models.Access) (*domain.Access, error) {
  106 + return &domain.Access{
  107 + Id: accessModel.Id,
  108 + ParentId: accessModel.ParentId,
  109 + AccessName: accessModel.AccessName,
  110 + AccessCode: accessModel.AccessCode,
  111 + AccessType: accessModel.AccessType,
  112 + Sort: accessModel.Sort,
  113 + Object: accessModel.Object,
  114 + Action: accessModel.Action,
  115 + Module: accessModel.Module,
  116 + Icon: accessModel.Icon,
  117 + Status: accessModel.Status,
  118 + }, nil
  119 +}
  120 +func NewAccessRepository(transactionContext *pgTransaction.TransactionContext) (*AccessRepository, error) {
  121 + if transactionContext == nil {
  122 + return nil, fmt.Errorf("transactionContext参数不能为nil")
  123 + } else {
  124 + return &AccessRepository{
  125 + transactionContext: transactionContext,
  126 + }, nil
  127 + }
  128 +}
  1 +version: v1
  2 +kind: Project
  3 +metadata:
  4 + name: godevp
  5 + description: 开发工具平台
  6 + version: 0.0.1
  7 + repository: github.com/tiptok/godevp
  8 + contact:
  9 + name: tiptok
  10 + email: 785409885@qq.com
  1 +version: v1
  2 +kind: Schema
  3 +metadata:
  4 + name: access
  5 + description: 权限
  6 + attributes:
  7 + - ref: Id
  8 + required: true
  9 + - ref: ParentId
  10 + required: true
  11 + - ref: AccessName
  12 + required: true
  13 + - ref: AccessCode
  14 + required: true
  15 + - ref: AccessType
  16 + required: true
  17 + - ref: Sort
  18 + required: true
  19 + - ref: Object
  20 + required: true
  21 + - ref: Action
  22 + required: true
  23 + - ref: Module
  24 + required: true
  25 + - ref: Icon
  26 + required: true
  27 + - ref: Status
  28 + required: true
  1 +version: v1
  2 +kind: Schema
  3 +metadata:
  4 + name: authAccess
  5 + description: 权限
  6 + attributes:
  7 + - ref: accessToken
  8 + required: true
  9 + - ref: expiresIn
  10 + required: true
  11 + - ref: refreshToken
  12 + required: true
  1 +version: v1
  2 +kind: Schema
  3 +metadata:
  4 + name: authRole
  5 + description: 权限角色
  6 + attributes:
  7 + - name: id
  8 + description: 角色id
  9 + type:
  10 + primitive: string
  11 + - name: name
  12 + description: 角色名称
  13 + type:
  14 + primitive: string
  1 +version: v1
  2 +kind: Schema
  3 +metadata:
  4 + name: authUser
  5 + description: 权限用户
  6 + attributes:
  7 + - name: id
  8 + description: 用户id
  9 + type:
  10 + primitive: int64
  11 + - name: adminType
  12 + description: 管理员类型 1:超级管理员 2:普通账号
  13 + type:
  14 + primitive: int
  15 + - name: name
  16 + description: 名称
  17 + type:
  18 + primitive: string
  19 + - name: phone
  20 + description: 电话
  21 + type:
  22 + primitive: string
  23 + - name: roles
  24 + description: 角色列表
  25 + type:
  26 + array: authRole
  1 +version: v1
  2 +kind: Schema
  3 +metadata:
  4 + name: clientPackageInfo
  5 + description: 客户端安装包信息
  6 + attributes:
  7 + - name: fileName
  8 + description: 文件名
  9 + type:
  10 + primitive: string
  11 + - name: path
  12 + description: 文件路径
  13 + type:
  14 + primitive: string
  1 +version: v1
  2 +kind: Schema
  3 +metadata:
  4 + name: clientVersion
  5 + description: 客户端版本信息
  6 + attributes:
  7 + - ref: Id
  8 + required: true
  9 + - name: commiter
  10 + description: 提交人
  11 + type:
  12 + primitive: string
  13 + - name: projectName
  14 + description: 项目名称
  15 + type:
  16 + primitive: string
  17 + - name: version
  18 + description: 版本号
  19 + type:
  20 + primitive: string
  21 + - name: title
  22 + description: 标题
  23 + type:
  24 + primitive: string
  25 + - name: remark
  26 + description: 其他备注信息
  27 + type:
  28 + primitive: string
  29 + - name: clientPackageInfo
  30 + description: 客户端安装包信息
  31 + type:
  32 + array: clientPackageInfo
  33 + - name: createTime
  34 + description: 创建时间
  35 + type:
  36 + primitive: datetime
  1 +version: v1
  2 +kind: Schema
  3 +metadata:
  4 + name: menu
  5 + description: 菜单
  6 + attributes:
  7 + - name: id
  8 + description: 编号
  9 + type:
  10 + primitive: int64
  11 + - name: parentId
  12 + description: 父级id
  13 + type:
  14 + primitive: int64
  15 + - name: name
  16 + description: 菜单名称
  17 + type:
  18 + primitive: string
  19 + - name: code
  20 + description: 菜单code
  21 + type:
  22 + primitive: string
  23 + - name: sort
  24 + description: 排序
  25 + type:
  26 + primitive: int
  27 + - name: icon
  28 + description: 图标地址
  29 + type:
  30 + primitive: string
  31 + - name: status
  32 + description: 状态 1-启用 0-禁用
  33 + type:
  34 + primitive: int
  1 +version: v1
  2 +kind: Schema
  3 +metadata:
  4 + name: projectModule
  5 + description: 项目模块
  6 + attributes:
  7 + - name: id
  8 + type:
  9 + primitive: int64
  10 + description: 唯一标识
  11 + required: true
  12 + - ref: projectName
  13 + required: true
  14 + - ref: projectKey
  15 + required: true
  16 + - ref: description
  17 + required: true
  18 + - ref: status
  19 + required: true
  20 + - ref: CreateTime
  21 + required: true
  22 + - ref: UpdateTime
  23 + required: true
  24 + - name: projectModuleVersion
  25 + required: true
  26 + description: 项目模板版本信息
  27 + type:
  28 + schema: projectModuleVersion
  1 +version: v1
  2 +kind: Schema
  3 +metadata:
  4 + name: projectModuleFiles
  5 + description: 项目模板文件
  6 + attributes:
  7 + - name: id
  8 + type:
  9 + primitive: int64
  10 + description: 唯一标识
  11 + - ref: projectModuleId
  12 + required: true
  13 + - ref: projectModuleVersionId
  14 + required: true
  15 + - ref: fileType
  16 + required: true
  17 + - ref: codeBlock
  18 + required: true
  19 + - ref: ParentId
  20 + required: true
  21 + - ref: Sort
  22 + required: true
  23 + - name: remark
  24 + type:
  25 + primitive: string
  26 + description: 备注信息
  27 + - ref: CreateTime
  28 + required: true
  29 + - ref: UpdateTime
  30 + required: true
  31 + - ref: path
  32 + required: true
  33 + - ref: tag
  34 + required: true
  1 +version: v1
  2 +kind: Schema
  3 +metadata:
  4 + name: projectModuleVersion
  5 + description: 项目模块版本
  6 + attributes:
  7 + - name: id
  8 + type:
  9 + primitive: int64
  10 + description: 唯一标识
  11 + - ref: projectModuleId
  12 + required: true
  13 + - name: version
  14 + description: 版本号
  15 + required: true
  16 + type:
  17 + primitive: int64
  18 + - ref: description
  19 + required: true
  20 + - ref: status
  21 + required: true
  22 + - ref: CreateTime
  23 + required: true
  24 + - ref: UpdateTime
  25 + required: true
  1 +version: v1
  2 +kind: Schema
  3 +metadata:
  4 + name: role
  5 + description: 角色实体
  6 + attributes:
  7 + - ref: Id
  8 + required: true
  9 + - ref: RoleName
  10 + required: true
  11 + - ref: ParentId
  12 + required: true
  13 + - ref: CreateTime
  14 + required: true
  15 + - ref: UpdateTime
  16 + required: true
  1 +version: v1
  2 +kind: Schema
  3 +metadata:
  4 + name: roleAccess
  5 + description: 角色权限
  6 + attributes:
  7 + - ref: Id
  8 + required: true
  9 + - ref: RoleId
  10 + required: true
  11 + - ref: AccessId
  12 + required: true
  13 + - ref: Object
  14 + required: true
  15 + - ref: Action
  16 + required: true
  17 + - ref: Option
  18 + required: true
  1 +version: v1
  2 +kind: Schema
  3 +metadata:
  4 + name: task
  5 + description: 任务实体
  6 + attributes:
  7 + - ref: taskId
  8 + required: true
  9 + - ref: taskName
  10 + required: true
  11 + - name: taskDescription
  12 + description: 任务描述
  13 + type:
  14 + primitive: string
  1 +version: v1
  2 +kind: Schema
  3 +metadata:
  4 + name: users
  5 + description: 用户实体
  6 + attributes:
  7 + - ref: Id
  8 + required: true
  9 + - ref: Name
  10 + required: true
  11 + - ref: Phone
  12 + required: true
  13 + - ref: Passwd
  14 + required: true
  15 + - ref: Roles
  16 + required: true
  17 + - ref: Status
  18 + required: true
  19 + - ref: AdminType
  20 + required: true
  21 + - ref: CreateTime
  22 + required: true
  23 + - ref: UpdateTime
  24 + required: true
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: login
  5 + type: command
  6 + description: 登录
  7 + payload:
  8 + - name: username
  9 + type:
  10 + primitive: string
  11 + description: 用户名
  12 + required: true
  13 + - name: password
  14 + type:
  15 + primitive: string
  16 + description: 密码
  17 + required: true
  18 + result:
  19 + - name: access
  20 + type:
  21 + schema: authAccess
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: profile
  5 + type: command
  6 + description: 获得当前用户数据
  7 + payload:
  8 + - name: userId
  9 + type:
  10 + primitive: int64
  11 + required: true
  12 + result:
  13 + - name: menus
  14 + type:
  15 + array: menu
  16 + - name: user
  17 + type:
  18 + schema: authUser
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: refresh
  5 + type: command
  6 + description: 刷新权限
  7 + payload:
  8 + - name: refreshToken
  9 + type:
  10 + primitive: string
  11 + required: true
  12 + result:
  13 + - name: access
  14 + type:
  15 + schema: authAccess
  1 +version: v1
  2 +kind: Service
  3 +metadata:
  4 + name: auth
  5 + description: 认证服务
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: createClientVersion
  5 + type: command
  6 + description: 创建
  7 + payload:
  8 + - name: commiter
  9 + description: 提交人
  10 + type:
  11 + primitive: string
  12 + - name: projectName
  13 + description: 项目名称
  14 + type:
  15 + primitive: string
  16 + - name: version
  17 + description: 版本号
  18 + type:
  19 + primitive: string
  20 + - name: title
  21 + description: 标题
  22 + type:
  23 + primitive: string
  24 + - name: remark
  25 + description: 其他备注信息
  26 + type:
  27 + primitive: string
  28 + - name: clientPackageInfo
  29 + description: 客户端安装包信息
  30 + type:
  31 + array: clientPackageInfo
  32 + result:
  33 + - name: clientVersion
  34 + type:
  35 + schema: clientVersion
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: getClientVersion
  5 + type: query
  6 + description: 返回
  7 + payload:
  8 + - ref: Id
  9 + required: true
  10 + result:
  11 + - name: clientVersion
  12 + type:
  13 + schema: clientVersion
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: listClientVersion
  5 + type: query
  6 + description: 返回列表
  7 + payload:
  8 + - ref: offset
  9 + required: true
  10 + - ref: limit
  11 + required: true
  12 + result:
  13 + - ref: count
  14 + required: true
  15 + - name: clientVersions
  16 + type:
  17 + array: clientVersion
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: removeClientVersion
  5 + type: command
  6 + description: 移除
  7 + payload:
  8 + - ref: Id
  9 + required: true
  10 + result:
  11 + - name: clientVersion
  12 + type:
  13 + schema: clientVersion
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: updateClientVersion
  5 + type: command
  6 + description: 更新
  7 + payload:
  8 + - ref: Id
  9 + required: true
  10 + - name: commiter
  11 + description: 提交人
  12 + type:
  13 + primitive: string
  14 + - name: projectName
  15 + description: 项目名称
  16 + type:
  17 + primitive: string
  18 + - name: version
  19 + description: 版本号
  20 + type:
  21 + primitive: string
  22 + - name: title
  23 + description: 标题
  24 + type:
  25 + primitive: string
  26 + - name: remark
  27 + description: 其他备注信息
  28 + type:
  29 + primitive: string
  30 + - name: clientPackageInfo
  31 + description: 客户端安装包信息
  32 + type:
  33 + array: clientPackageInfo
  34 + result:
  35 + - name: clientVersion
  36 + type:
  37 + schema: clientVersion
  1 +version: v1
  2 +kind: Service
  3 +metadata:
  4 + name: clientVersion
  5 + description: 客户端版本服务
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: createProjectModule
  5 + type: command
  6 + description: 创建
  7 + payload:
  8 + - ref: projectName
  9 + required: true
  10 + - ref: projectKey
  11 + required: true
  12 + - ref: description
  13 + required: true
  14 + - ref: status
  15 + required: true
  16 + result:
  17 + - name: projectModule
  18 + type:
  19 + schema: projectModule
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: getProjectModule
  5 + type: query
  6 + description: 返回
  7 + payload:
  8 + - ref: projectModuleId
  9 + required: true
  10 + result:
  11 + - name: projectModule
  12 + type:
  13 + schema: projectModule
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: listProjectModule
  5 + type: query
  6 + description: 返回列表
  7 + payload:
  8 + - ref: offset
  9 + required: true
  10 + - ref: limit
  11 + required: true
  12 + result:
  13 + - ref: count
  14 + required: true
  15 + - name: projectModule
  16 + type:
  17 + array: projectModule
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: removeProjectModule
  5 + type: command
  6 + description: 移除
  7 + payload:
  8 + - ref: projectModuleId
  9 + required: true
  10 + result:
  11 + - name: projectModule
  12 + type:
  13 + schema: projectModule
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: updateProjectModule
  5 + type: command
  6 + description: 更新
  7 + payload:
  8 + - ref: projectModuleId
  9 + required: true
  10 + - ref: projectName
  11 + required: true
  12 + - ref: projectKey
  13 + required: true
  14 + - ref: description
  15 + required: true
  16 + - ref: status
  17 + required: true
  18 + result:
  19 + - name: projectModule
  20 + type:
  21 + schema: projectModule
  1 +version: v1
  2 +kind: Service
  3 +metadata:
  4 + name: projectModule
  5 + description: 项目模块服务
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: createProjectModuleFiles
  5 + type: command
  6 + description: 创建
  7 + payload:
  8 + - ref: projectModuleId
  9 + required: true
  10 + - ref: projectModuleVersionId
  11 + required: true
  12 + - ref: fileType
  13 + required: true
  14 + - ref: codeBlock
  15 + required: true
  16 + - ref: ParentId
  17 + required: true
  18 + - ref: Sort
  19 + required: true
  20 + - name: remark
  21 + type:
  22 + primitive: string
  23 + description: 备注信息
  24 + result:
  25 + - name: projectModuleFiles
  26 + type:
  27 + schema: projectModuleFiles
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: getProjectModuleFiles
  5 + type: query
  6 + description: 返回
  7 + payload:
  8 + - ref: projectModuleFilesId
  9 + required: true
  10 + result:
  11 + - name: projectModuleFiles
  12 + type:
  13 + schema: projectModuleFiles
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: listProjectModuleFiles
  5 + type: query
  6 + description: 返回列表
  7 + payload:
  8 + - ref: offset
  9 + required: true
  10 + - ref: limit
  11 + required: true
  12 + result:
  13 + - ref: count
  14 + required: true
  15 + - name: projectModuleFiles
  16 + type:
  17 + array: projectModuleFiles
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: removeProjectModuleFiles
  5 + type: command
  6 + description: 移除
  7 + payload:
  8 + - ref: projectModuleFilesId
  9 + required: true
  10 + result:
  11 + - name: projectModuleFiles
  12 + type:
  13 + schema: projectModuleFiles
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: updateProjectModuleFiles
  5 + type: command
  6 + description: 更新
  7 + payload:
  8 + - ref: projectModuleFilesId
  9 + required: true
  10 + - ref: codeBlock
  11 + required: true
  12 + - name: remark
  13 + type:
  14 + primitive: string
  15 + description: 备注信息
  16 + result:
  17 + - name: projectModuleFiles
  18 + type:
  19 + schema: projectModuleFiles
  1 +version: v1
  2 +kind: Service
  3 +metadata:
  4 + name: projectModuleFiles
  5 + description: 项目模块文件
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: createProjectModuleVersion
  5 + type: command
  6 + description: 创建
  7 + payload:
  8 + - ref: projectModuleId
  9 + required: true
  10 + - name: version
  11 + description: 唯一标识
  12 + required: true
  13 + type:
  14 + primitive: int64
  15 + - ref: description
  16 + required: true
  17 + result:
  18 + - name: projectModuleVersion
  19 + type:
  20 + schema: projectModuleVersion
  1 +version: v1
  2 +kind: Method
  3 +metadata:
  4 + name: getProjectModuleVersion
  5 + type: query
  6 + description: 返回
  7 + payload:
  8 + - ref: projectModuleVersionId
  9 + required: true
  10 + result:
  11 + - name: projectModuleVersion
  12 + type:
  13 + schema: projectModuleVersion