// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.

/**
 * Auto-generated by 'os i18n extract' for locale 'zh-CN'.
 * Edit translations in place; re-run extract (with --merge) to fill new gaps.
 * Do not hand-edit the structure — only the leaf string values.
 */

import type { TranslationData } from '@objectstack/spec/system';

export const zhCNObjects: NonNullable<TranslationData['objects']> = {
  sys_user: {
    label: "用户",
    pluralLabel: "用户",
    description: "用于身份认证的用户账号",
    fields: {
      name: {
        label: "名称"
      },
      email: {
        label: "邮箱"
      },
      email_verified: {
        label: "邮箱已验证"
      },
      two_factor_enabled: {
        label: "已启用双因素认证",
        help: "该用户是否已启用双因素认证。由 better-auth 的 `twoFactor` 插件维护。"
      },
      role: {
        label: "平台角色",
        help: "平台级角色（admin、user 等）。通过“设置平台角色”操作设置。"
      },
      banned: {
        label: "已封禁",
        help: "为 true 时，用户无法登录。可通过“封禁用户 / 解除封禁”操作切换。"
      },
      ban_reason: {
        label: "封禁原因"
      },
      ban_expires: {
        label: "封禁到期时间",
        help: "设置后，到达该时间会自动解除封禁。"
      },
      image: {
        label: "头像"
      },
      id: {
        label: "用户 ID"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    },
    _views: {
      me: {
        label: "My Profile"
      },
      all_users: {
        label: "全部用户"
      },
      unverified: {
        label: "未验证"
      },
      two_factor: {
        label: "已启用 2FA"
      },
      banned: {
        label: "已封禁"
      }
    },
    _actions: {
      invite_user: {
        label: "邀请用户",
        successMessage: "邀请已发送"
      },
      ban_user: {
        label: "封禁用户",
        confirmText: "要封禁该用户吗？封禁后会立即登出，且在解除封禁前无法再次登录。",
        successMessage: "用户已封禁"
      },
      unban_user: {
        label: "解除封禁",
        successMessage: "用户已解除封禁"
      },
      set_user_password: {
        label: "设置密码",
        successMessage: "密码已更新"
      },
      set_user_role: {
        label: "设置平台角色",
        successMessage: "角色已更新"
      },
      impersonate_user: {
        label: "模拟用户",
        confirmText: "要为该用户启动模拟会话吗？仅限合法支持场景使用——所有操作都会被记录。",
        successMessage: "已开始模拟该用户"
      },
      update_my_profile: {
        label: "更新资料",
        successMessage: "已更新资料"
      },
      change_my_password: {
        label: "修改密码",
        successMessage: "已修改密码"
      },
      change_my_email: {
        label: "修改邮箱",
        successMessage: "已发送验证邮件，请前往新邮箱确认。"
      },
      resend_verification_email: {
        label: "Resend Verification Email",
        successMessage: "Verification email sent — check your inbox."
      },
      delete_my_account: {
        label: "删除我的账号",
        confirmText: "确定要永久删除您的账户吗？此操作无法撤销——您的所有会话都将被终止，并将按照配置的保留策略移除您拥有的所有数据。",
        successMessage: "已删除账号"
      },
      enable_two_factor: {
        label: "Enable Two-Factor Auth",
        successMessage: "Two-factor authentication enabled. Scan the QR code or paste the otpauth URI into your authenticator app, then verify a code to complete setup."
      },
      disable_two_factor: {
        label: "Disable Two-Factor Auth",
        confirmText: "Turn off two-factor authentication? Your account will be less secure.",
        successMessage: "Two-factor authentication disabled."
      },
      generate_backup_codes: {
        label: "Regenerate Backup Codes",
        confirmText: "Generate a new set of backup codes? Any previously generated codes will stop working.",
        successMessage: "New backup codes generated — save them somewhere safe."
      }
    }
  },
  sys_session: {
    label: "会话",
    pluralLabel: "会话",
    description: "活跃的用户会话",
    fields: {
      user_id: {
        label: "用户"
      },
      expires_at: {
        label: "过期时间"
      },
      active_organization_id: {
        label: "当前组织"
      },
      active_team_id: {
        label: "当前团队"
      },
      ip_address: {
        label: "IP 地址"
      },
      user_agent: {
        label: "用户代理"
      },
      impersonated_by: {
        label: "模拟发起人",
        help: "如存在，该字段表示发起本次模拟会话的管理员用户 ID。"
      },
      token: {
        label: "会话令牌",
        help: "不透明会话令牌——绝不会在 UI 中暴露。"
      },
      id: {
        label: "会话 ID"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    },
    _views: {
      mine: {
        label: "我的会话"
      },
      all_sessions: {
        label: "全部"
      }
    },
    _actions: {
      revoke_my_other_sessions: {
        label: "退出其他设备",
        confirmText: "要退出你当前已登录的其他所有设备吗？当前会话将保持活跃。",
        successMessage: "其他所有会话已撤销"
      },
      revoke_session: {
        label: "撤销会话",
        confirmText: "要撤销此会话吗？系统将使该设备上的用户退出登录。",
        successMessage: "会话已撤销"
      }
    }
  },
  sys_account: {
    label: "身份链接",
    pluralLabel: "身份链接",
    description: "OAuth 与认证提供方账号",
    fields: {
      id: {
        label: "身份链接 ID"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      },
      provider_id: {
        label: "提供方 ID",
        help: "OAuth 提供方标识（google、github 等）"
      },
      account_id: {
        label: "提供方账号 ID",
        help: "用户在该提供方系统中的 ID"
      },
      user_id: {
        label: "用户",
        help: "关联到用户表"
      },
      access_token: {
        label: "访问令牌"
      },
      refresh_token: {
        label: "刷新令牌"
      },
      id_token: {
        label: "ID 令牌"
      },
      access_token_expires_at: {
        label: "Access Token 过期时间"
      },
      refresh_token_expires_at: {
        label: "Refresh Token 过期时间"
      },
      scope: {
        label: "OAuth 范围"
      },
      password: {
        label: "密码哈希",
        help: "邮箱/密码提供方使用的密码哈希"
      }
    },
    _views: {
      mine: {
        label: "我的链接"
      },
      by_provider: {
        label: "按提供方"
      },
      all_links: {
        label: "全部"
      }
    },
    _actions: {
      link_social: {
        label: "关联社交账号"
      },
      unlink_account: {
        label: "解除关联",
        confirmText: "确定要解除此身份关联吗？在用户从账户设置中重新关联之前，将无法再使用此提供方登录。",
        successMessage: "已解除身份关联"
      }
    }
  },
  sys_verification: {
    label: "验证记录",
    pluralLabel: "验证记录",
    description: "邮箱和手机号验证令牌",
    fields: {
      id: {
        label: "验证记录 ID"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      },
      value: {
        label: "验证令牌",
        help: "用于验证的令牌或验证码"
      },
      expires_at: {
        label: "过期时间"
      },
      identifier: {
        label: "标识",
        help: "邮箱地址或手机号码"
      }
    }
  },
  sys_organization: {
    label: "组织",
    pluralLabel: "组织",
    description: "用于多租户分组的组织",
    fields: {
      name: {
        label: "名称"
      },
      slug: {
        label: "标识符",
        help: "适合 URL 使用的标识符"
      },
      logo: {
        label: "标识"
      },
      metadata: {
        label: "元数据",
        help: "JSON 序列化的组织元数据"
      },
      id: {
        label: "组织 ID"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    },
    _views: {
      all_orgs: {
        label: "全部"
      }
    },
    _actions: {
      create_organization: {
        label: "创建组织",
        successMessage: "组织已创建"
      },
      update_organization: {
        label: "编辑组织",
        successMessage: "组织已更新"
      },
      delete_organization: {
        label: "删除组织",
        confirmText: "要删除该组织吗？所有成员将立即失去访问权限。此操作无法撤销。",
        successMessage: "组织已删除"
      },
      set_active_organization: {
        label: "设为当前",
        successMessage: "当前组织已切换"
      },
      leave_organization: {
        label: "退出组织",
        confirmText: "要退出该组织吗？退出后你将失去对其所有资源的访问权限。",
        successMessage: "你已退出该组织"
      },
      change_slug: {
        label: "Change Slug",
        confirmText: "Renaming the slug rewrites every platform subdomain for this org and parks the old slug for 90 days. Continue?",
        successMessage: "Organization slug changed"
      }
    }
  },
  sys_member: {
    label: "成员",
    pluralLabel: "成员",
    description: "组织成员关系记录",
    fields: {
      id: {
        label: "成员 ID"
      },
      created_at: {
        label: "创建时间"
      },
      organization_id: {
        label: "组织"
      },
      user_id: {
        label: "用户"
      },
      role: {
        label: "角色",
        help: "成员在组织内的角色",
        options: {
          owner: "所有者",
          admin: "管理员",
          member: "成员"
        }
      }
    },
    _views: {
      mine: {
        label: "My Memberships"
      }
    },
    _actions: {
      add_member: {
        label: "添加成员",
        successMessage: "成员已添加"
      },
      update_member_role: {
        label: "更改角色",
        successMessage: "成员角色已更新"
      },
      remove_member: {
        label: "移除成员",
        confirmText: "要将该成员移出组织吗？移除后其将失去对该组织所有资源的访问权限。",
        successMessage: "成员已移除"
      },
      transfer_ownership: {
        label: "转移所有权",
        confirmText: "确定要将该组织的所有权转移给所选成员吗？您将被降级为管理员，并失去仅所有者拥有的权限。",
        successMessage: "已转移所有权"
      }
    }
  },
  sys_invitation: {
    label: "邀请",
    pluralLabel: "邀请",
    description: "用于用户加入组织的邀请记录",
    fields: {
      id: {
        label: "邀请 ID"
      },
      created_at: {
        label: "创建时间"
      },
      organization_id: {
        label: "组织"
      },
      email: {
        label: "邮箱",
        help: "被邀请用户的邮箱地址"
      },
      role: {
        label: "角色",
        help: "接受邀请后分配的角色",
        options: {
          owner: "所有者",
          admin: "管理员",
          member: "成员"
        }
      },
      status: {
        label: "状态",
        options: {
          pending: "待处理",
          accepted: "已接受",
          rejected: "已拒绝",
          expired: "已过期",
          canceled: "已取消"
        }
      },
      inviter_id: {
        label: "邀请人",
        help: "发送邀请的用户"
      },
      expires_at: {
        label: "过期时间"
      },
      team_id: {
        label: "团队",
        help: "接受邀请后可选分配的团队"
      }
    },
    _views: {
      pending: {
        label: "待处理"
      },
      accepted: {
        label: "已接受"
      },
      expired: {
        label: "已过期 / 已取消"
      },
      all_invitations: {
        label: "全部"
      }
    },
    _actions: {
      invite_user: {
        label: "邀请用户",
        successMessage: "邀请已发送"
      },
      cancel_invitation: {
        label: "取消邀请",
        confirmText: "要取消该邀请吗？接收人将无法再接受该邀请。",
        successMessage: "邀请已取消"
      },
      resend_invitation: {
        label: "重新发送邀请",
        successMessage: "邀请已重新发送"
      },
      accept_invitation: {
        label: "接受邀请",
        successMessage: "已接受邀请"
      },
      reject_invitation: {
        label: "拒绝邀请",
        confirmText: "确定要拒绝此邀请吗？邀请人将收到通知，您需要新的邀请才能加入。",
        successMessage: "已拒绝邀请"
      }
    }
  },
  sys_team: {
    label: "团队",
    pluralLabel: "团队",
    description: "组织内用于精细化分组的团队",
    fields: {
      name: {
        label: "名称"
      },
      organization_id: {
        label: "组织",
        help: "该团队所属的上级组织"
      },
      id: {
        label: "团队 ID"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    },
    _views: {
      by_org: {
        label: "按组织"
      },
      all_teams: {
        label: "全部"
      }
    },
    _actions: {
      create_team: {
        label: "创建团队",
        successMessage: "团队已创建"
      },
      update_team: {
        label: "编辑团队",
        successMessage: "团队已更新"
      },
      remove_team: {
        label: "删除团队",
        confirmText: "要删除该团队吗？成员将失去所有团队范围内的访问权限。此操作无法撤销。",
        successMessage: "团队已删除"
      }
    }
  },
  sys_team_member: {
    label: "团队成员",
    pluralLabel: "团队成员",
    description: "将用户关联到团队的团队成员记录",
    fields: {
      id: {
        label: "团队成员 ID"
      },
      created_at: {
        label: "创建时间"
      },
      team_id: {
        label: "团队"
      },
      user_id: {
        label: "用户"
      }
    },
    _actions: {
      add_team_member: {
        label: "添加成员",
        successMessage: "团队成员已添加"
      },
      remove_team_member: {
        label: "移出团队",
        confirmText: "要将该用户移出团队吗？移除后其将失去所有团队范围内的访问权限。",
        successMessage: "团队成员已移除"
      }
    }
  },
  sys_department: {
    label: "部门",
    pluralLabel: "部门",
    description: "层级化组织骨架节点（部门 / 事业部 / 业务单元 / 办公地点）。",
    fields: {
      name: {
        label: "名称"
      },
      code: {
        label: "编码",
        help: "简短且稳定的编码（例如 EMEA-SALES），在租户内唯一。"
      },
      kind: {
        label: "类型",
        help: "分类提示——不会改变图谱语义。",
        options: {
          company: "公司",
          division: "事业部",
          department: "部门",
          team: "团队",
          office: "办公地点",
          cost_center: "成本中心"
        }
      },
      parent_department_id: {
        label: "上级部门",
        help: "组织树的自关联字段。Null 表示租户根节点。"
      },
      organization_id: {
        label: "组织",
        help: "租户范围。"
      },
      manager_user_id: {
        label: "部门负责人",
        help: "负责该组织单元的用户（部门负责人 / lead）。"
      },
      active: {
        label: "启用",
        help: "为 false 时，图谱查询不会展开该部门成员。"
      },
      effective_from: {
        label: "生效时间",
        help: "该部门生效的时间（HRIS 同步）。"
      },
      effective_to: {
        label: "失效时间",
        help: "该部门停用的时间（HRIS 同步）。"
      },
      external_ref: {
        label: "外部引用",
        help: "上游 HRIS 中的 ID（Workday / SAP HR / 北森）。"
      },
      id: {
        label: "部门 ID"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    },
    _views: {
      active: {
        label: "启用"
      },
      inactive: {
        label: "停用"
      },
      by_kind: {
        label: "按类型"
      },
      all_departments: {
        label: "全部"
      }
    }
  },
  sys_department_member: {
    label: "部门成员",
    pluralLabel: "部门成员",
    description: "用户到部门的任职关系（适配矩阵组织并支持生效时间）。",
    fields: {
      id: {
        label: "成员 ID"
      },
      department_id: {
        label: "部门"
      },
      user_id: {
        label: "用户"
      },
      role_in_department: {
        label: "部门内角色",
        help: "`lead` 表示日常负责人；`deputy` 可在审批路由中代替负责人。",
        options: {
          member: "成员",
          lead: "负责人",
          deputy: "副负责人"
        }
      },
      is_primary: {
        label: "主任职",
        help: "当用户属于多个部门时，用于标记报表上的主部门。"
      },
      effective_from: {
        label: "生效时间"
      },
      effective_to: {
        label: "失效时间"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    }
  },
  sys_api_key: {
    label: "API 密钥",
    pluralLabel: "API 密钥",
    description: "用于程序化访问的 API 密钥",
    fields: {
      name: {
        label: "名称",
        help: "API 密钥的人类可读标签"
      },
      prefix: {
        label: "前缀",
        help: "用于识别密钥的可见前缀（例如 `osk_`）"
      },
      user_id: {
        label: "所有者",
        help: "拥有该 API 密钥的用户"
      },
      scopes: {
        label: "范围",
        help: "权限范围的 JSON 数组"
      },
      expires_at: {
        label: "过期时间"
      },
      last_used_at: {
        label: "最近使用时间",
        help: "每次 API 调用时自动更新"
      },
      revoked: {
        label: "已撤销"
      },
      key: {
        label: "哈希密钥",
        help: "API 密钥值的哈希——绝不会向客户端暴露"
      },
      id: {
        label: "API 密钥 ID"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    },
    _views: {
      mine: {
        label: "我的密钥"
      },
      active: {
        label: "启用"
      },
      revoked: {
        label: "已撤销"
      },
      all_keys: {
        label: "全部"
      }
    },
    _actions: {
      revoke_api_key: {
        label: "撤销 API 密钥",
        confirmText: "要撤销该 API 密钥吗？所有使用该密钥的客户端都将立即失去访问权限。",
        successMessage: "API 密钥已撤销"
      },
      restore_api_key: {
        label: "恢复 API 密钥",
        confirmText: "要恢复已撤销的 API 密钥吗？持有该密钥的现有客户端将重新获得访问权限。",
        successMessage: "API 密钥已恢复"
      }
    }
  },
  sys_two_factor: {
    label: "双因素认证",
    pluralLabel: "双因素认证凭据",
    description: "双因素认证凭据",
    fields: {
      id: {
        label: "双因素认证 ID"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      },
      user_id: {
        label: "用户"
      },
      secret: {
        label: "密钥",
        help: "TOTP 密钥"
      },
      backup_codes: {
        label: "备用恢复码",
        help: "JSON 序列化的备用恢复码"
      },
      verified: {
        label: "Verified",
        help: "Whether the enrollment was confirmed with a valid TOTP code (managed by better-auth)"
      }
    },
    _views: {
      mine: {
        label: "我的启用记录"
      },
      all_enrollments: {
        label: "全部"
      }
    },
    _actions: {
      enable_two_factor: {
        label: "启用 2FA"
      },
      disable_two_factor: {
        label: "停用 2FA",
        confirmText: "要停用你账号上的双因素认证吗？",
        successMessage: "2FA 已停用"
      },
      regenerate_backup_codes: {
        label: "重新生成备用码",
        confirmText: "确定要重新生成备份码吗？此前的所有备份码将立即失效。"
      }
    }
  },
  sys_device_code: {
    label: "设备代码",
    pluralLabel: "设备代码",
    description: "OAuth 2.0 设备授权流程（RFC 8628）的待处理请求",
    fields: {
      id: {
        label: "设备代码 ID"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      },
      device_code: {
        label: "设备代码",
        help: "返回给轮询设备的高熵令牌"
      },
      user_code: {
        label: "用户代码",
        help: "面向用户的短代码（例如 ABCD-EFGH）"
      },
      user_id: {
        label: "用户",
        help: "批准该设备授权的用户"
      },
      expires_at: {
        label: "过期时间",
        help: "设备码与用户码失效的时间"
      },
      status: {
        label: "状态",
        help: "当前状态：`pending` | `approved` | `denied`"
      },
      last_polled_at: {
        label: "最近轮询时间",
        help: "最近一次 `/device/token` 轮询的时间戳"
      },
      polling_interval: {
        label: "轮询间隔（毫秒）",
        help: "服务器建议的最小轮询间隔（毫秒）"
      },
      client_id: {
        label: "客户端 ID",
        help: "发起请求的设备对应的 OAuth 客户端标识"
      },
      scope: {
        label: "范围",
        help: "设备请求的、以空格分隔的 OAuth scopes"
      }
    }
  },
  sys_user_preference: {
    label: "用户偏好",
    pluralLabel: "用户偏好",
    description: "按用户存储的键值偏好设置（主题、语言等）",
    fields: {
      id: {
        label: "偏好设置 ID"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      },
      user_id: {
        label: "用户",
        help: "该偏好设置所属的用户"
      },
      key: {
        label: "键",
        help: "偏好设置键（例如 theme、locale、plugin.ai.auto_save）"
      },
      value: {
        label: "值",
        help: "偏好设置值（任意可 JSON 序列化类型）"
      }
    },
    _views: {
      mine: {
        label: "我的偏好"
      },
      by_user: {
        label: "按用户"
      },
      all_preferences: {
        label: "全部"
      }
    }
  },
  sys_oauth_application: {
    label: "OAuth 应用",
    pluralLabel: "OAuth 应用",
    description: "已注册的 OAuth/OIDC 客户端应用",
    fields: {
      id: {
        label: "ID"
      },
      name: {
        label: "名称"
      },
      icon: {
        label: "图标",
        help: "显示在同意授权页上的 Logo URL"
      },
      uri: {
        label: "主页 URI",
        help: "注册客户端的公开主页"
      },
      contacts: {
        label: "联系人",
        help: "联系人邮箱地址的 JSON 序列化列表"
      },
      tos: {
        label: "服务条款"
      },
      policy: {
        label: "隐私政策"
      },
      metadata: {
        label: "元数据",
        help: "应用元数据的 JSON 序列化内容"
      },
      client_id: {
        label: "客户端 ID",
        help: "公开的 OAuth 客户端标识"
      },
      client_secret: {
        label: "客户端密钥",
        help: "OAuth 客户端密钥（静态存储时会哈希/加密）"
      },
      redirect_uris: {
        label: "重定向 URI",
        help: "允许的重定向 URI 的 JSON 序列化列表"
      },
      post_logout_redirect_uris: {
        label: "登出后重定向 URI",
        help: "允许的登出后重定向 URI 的 JSON 序列化列表"
      },
      type: {
        label: "客户端类型",
        options: {
          web: "Web 应用",
          native: "原生应用",
          useragentbased: "基于用户代理",
          public: "公开"
        }
      },
      public: {
        label: "公开客户端",
        help: "将客户端标记为公开（非机密）OAuth 客户端"
      },
      require_pkce: {
        label: "要求 PKCE"
      },
      token_endpoint_auth_method: {
        label: "令牌端点认证方式",
        help: "例如 client_secret_basic、client_secret_post、none"
      },
      grant_types: {
        label: "授权类型",
        help: "允许的授权类型 JSON 序列化列表"
      },
      response_types: {
        label: "响应类型",
        help: "允许的响应类型 JSON 序列化列表"
      },
      scopes: {
        label: "允许的范围",
        help: "客户端可申请的 scopes 的 JSON 序列化列表"
      },
      subject_type: {
        label: "主体类型",
        help: "OIDC 主体类型（例如 public、pairwise）"
      },
      disabled: {
        label: "已禁用"
      },
      skip_consent: {
        label: "跳过同意",
        help: "视为受信任客户端并跳过授权同意页"
      },
      enable_end_session: {
        label: "启用 End Session",
        help: "允许客户端调用 OIDC end-session 端点"
      },
      software_id: {
        label: "软件 ID"
      },
      software_version: {
        label: "软件版本"
      },
      software_statement: {
        label: "软件声明",
        help: "用于声明客户端元数据的签名 JWT（RFC 7591 §2.3）"
      },
      user_id: {
        label: "所有者用户",
        help: "注册该应用的用户"
      },
      reference_id: {
        label: "引用 ID",
        help: "调用方提供的关联标识符"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    },
    _views: {
      mine: {
        label: "My Applications"
      },
      active: {
        label: "启用"
      },
      disabled_apps: {
        label: "已禁用"
      },
      all_apps: {
        label: "全部"
      }
    },
    _actions: {
      disable_oauth_application: {
        label: "停用 OAuth 应用",
        confirmText: "确定要停用此 OAuth 应用吗？已为其签发的有效访问令牌/刷新令牌将继续在 token、authorize 和 introspect 端点被拒绝。现有集成将立即停止工作。",
        successMessage: "OAuth 应用已停用"
      },
      enable_oauth_application: {
        label: "启用 OAuth 应用",
        confirmText: "确定要重新启用此 OAuth 应用吗？令牌签发、授权和内省将立即恢复。",
        successMessage: "OAuth 应用已启用"
      },
      create_oauth_application: {
        label: "注册 OAuth 应用"
      },
      rotate_client_secret: {
        label: "轮换 Client Secret",
        confirmText: "确定要轮换此 OAuth 客户端的密钥吗？旧密钥将立即失效，任何使用它的集成都将中断，直到更新为新密钥为止。新密钥仅显示一次。"
      },
      delete_oauth_application: {
        label: "删除 OAuth 应用",
        confirmText: "确定要永久删除此 OAuth 应用吗？所有已签发的令牌和授权同意都将失效，使用此 client_id 的集成将立即停止工作。此操作无法撤销。",
        successMessage: "OAuth 应用已删除"
      }
    }
  },
  sys_oauth_access_token: {
    label: "OAuth 访问令牌",
    pluralLabel: "OAuth 访问令牌",
    description: "签发给客户端应用的 OAuth 访问令牌",
    fields: {
      id: {
        label: "ID"
      },
      token: {
        label: "令牌",
        help: "不透明的访问令牌值"
      },
      client_id: {
        label: "客户端 ID",
        help: "指向 sys_oauth_application.client_id 的外键"
      },
      session_id: {
        label: "会话",
        help: "指向 sys_session.id 的外键"
      },
      user_id: {
        label: "用户",
        help: "指向 sys_user.id 的外键"
      },
      refresh_id: {
        label: "刷新令牌",
        help: "指向 sys_oauth_refresh_token.id 的外键"
      },
      reference_id: {
        label: "引用 ID",
        help: "调用方提供的关联标识符"
      },
      scopes: {
        label: "范围",
        help: "授予该令牌的 scopes 的 JSON 序列化列表"
      },
      expires_at: {
        label: "过期时间"
      },
      created_at: {
        label: "创建时间"
      }
    }
  },
  sys_oauth_refresh_token: {
    label: "OAuth 刷新令牌",
    pluralLabel: "OAuth 刷新令牌",
    description: "OAuth 刷新令牌（关联到会话）",
    fields: {
      id: {
        label: "ID"
      },
      token: {
        label: "令牌",
        help: "不透明的刷新令牌值"
      },
      client_id: {
        label: "客户端 ID",
        help: "指向 sys_oauth_application.client_id 的外键"
      },
      session_id: {
        label: "会话",
        help: "指向 sys_session.id 的外键"
      },
      user_id: {
        label: "用户",
        help: "指向 sys_user.id 的外键"
      },
      reference_id: {
        label: "引用 ID",
        help: "调用方提供的关联标识符"
      },
      scopes: {
        label: "范围",
        help: "授予该令牌的 scopes 的 JSON 序列化列表"
      },
      expires_at: {
        label: "过期时间"
      },
      created_at: {
        label: "创建时间"
      },
      revoked: {
        label: "撤销时间",
        help: "该刷新令牌被撤销的时间戳"
      },
      auth_time: {
        label: "认证时间",
        help: "该令牌链中用户最初完成认证的时间"
      }
    }
  },
  sys_oauth_consent: {
    label: "OAuth 同意记录",
    pluralLabel: "OAuth 同意记录",
    description: "用户对 OAuth 客户端应用的授权同意记录",
    fields: {
      id: {
        label: "ID"
      },
      client_id: {
        label: "客户端 ID",
        help: "指向 sys_oauth_application.client_id 的外键"
      },
      user_id: {
        label: "用户",
        help: "指向 sys_user.id 的外键"
      },
      reference_id: {
        label: "引用 ID",
        help: "调用方提供的关联标识符"
      },
      scopes: {
        label: "范围",
        help: "用户同意的 scopes 的 JSON 序列化列表"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    }
  },
  sys_jwks: {
    label: "签名密钥 (JWKS)",
    pluralLabel: "签名密钥 (JWKS)",
    description: "用于签发和验证 JWT 的非对称密钥对",
    fields: {
      id: {
        label: "密钥 ID",
        help: "JWK `kid` 值"
      },
      public_key: {
        label: "公钥",
        help: "JWK 公钥的 JSON 序列化内容"
      },
      private_key: {
        label: "私钥",
        help: "JWK 私钥的 JSON 序列化内容（静态存储时加密）"
      },
      created_at: {
        label: "创建时间"
      },
      expires_at: {
        label: "过期时间",
        help: "该密钥不再用于验证令牌的时间"
      }
    }
  },
  sys_audit_log: {
    label: "审计日志",
    pluralLabel: "审计日志",
    description: "平台事件的不可变审计追踪",
    fields: {
      created_at: {
        label: "时间戳"
      },
      action: {
        label: "操作",
        help: "操作类型（snake_case）",
        options: {
          create: "创建",
          update: "更新",
          delete: "删除",
          restore: "恢复",
          login: "登录",
          logout: "登出",
          permission_change: "权限变更",
          config_change: "配置变更",
          export: "导出",
          import: "导入"
        }
      },
      user_id: {
        label: "执行人",
        help: "执行该操作的用户（系统操作时为 null）"
      },
      object_name: {
        label: "对象",
        help: "目标对象（例如 sys_user、project_task）"
      },
      record_id: {
        label: "记录 ID",
        help: "受影响记录的 ID"
      },
      old_value: {
        label: "旧值",
        help: "旧状态的 JSON 序列化内容"
      },
      new_value: {
        label: "新值",
        help: "新状态的 JSON 序列化内容"
      },
      ip_address: {
        label: "IP 地址"
      },
      user_agent: {
        label: "用户代理"
      },
      tenant_id: {
        label: "租户",
        help: "用于多租户隔离的租户上下文"
      },
      metadata: {
        label: "元数据",
        help: "附加上下文的 JSON 序列化内容"
      },
      id: {
        label: "审计日志 ID"
      }
    },
    _views: {
      recent: {
        label: "最近"
      },
      writes_only: {
        label: "写入"
      },
      auth_events: {
        label: "认证"
      },
      config_changes: {
        label: "配置"
      },
      all_events: {
        label: "全部"
      }
    }
  },
  sys_presence: {
    label: "在线状态",
    pluralLabel: "在线状态",
    description: "实时用户在线与活动跟踪",
    fields: {
      id: {
        label: "在线状态 ID"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      },
      user_id: {
        label: "用户"
      },
      session_id: {
        label: "会话"
      },
      status: {
        label: "状态",
        options: {
          online: "在线",
          away: "离开",
          busy: "忙碌",
          offline: "离线"
        }
      },
      last_seen: {
        label: "最近在线时间"
      },
      current_location: {
        label: "当前位置"
      },
      device: {
        label: "设备",
        options: {
          desktop: "桌面端",
          mobile: "移动端",
          tablet: "平板端",
          other: "其他"
        }
      },
      custom_status: {
        label: "自定义状态"
      },
      metadata: {
        label: "元数据",
        help: "与在线状态关联的任意 JSON 元数据（对应 PresenceStateSchema.metadata）。"
      }
    }
  },
  sys_activity: {
    label: "活动",
    pluralLabel: "活动",
    description: "最近活动流条目（轻量、去规范化）",
    fields: {
      id: {
        label: "活动 ID"
      },
      timestamp: {
        label: "时间戳"
      },
      type: {
        label: "类型",
        options: {
          created: "已创建",
          updated: "已更新",
          deleted: "已删除",
          commented: "已评论",
          mentioned: "被提及",
          shared: "已共享",
          assigned: "已分配",
          completed: "已完成",
          login: "登录",
          logout: "登出",
          system: "系统"
        }
      },
      summary: {
        label: "摘要",
        help: "人类可读的单行摘要"
      },
      actor_id: {
        label: "执行人"
      },
      actor_name: {
        label: "执行人名称"
      },
      actor_avatar_url: {
        label: "执行人头像"
      },
      object_name: {
        label: "对象",
        help: "目标对象短名称（例如 account、sys_user）"
      },
      record_id: {
        label: "记录 ID"
      },
      record_label: {
        label: "记录标签",
        help: "写入时目标记录的显示标签"
      },
      url: {
        label: "URL",
        help: "指向活动目标的可选深度链接"
      },
      environment_id: {
        label: "项目",
        help: "项目上下文（多项目部署）"
      },
      metadata: {
        label: "元数据",
        help: "附加上下文的 JSON 序列化内容"
      }
    }
  },
  sys_comment: {
    label: "评论",
    pluralLabel: "评论",
    description: "通过 thread_id 附加到记录的线程化评论",
    fields: {
      id: {
        label: "评论 ID"
      },
      thread_id: {
        label: "线程",
        help: "线程标识——约定格式为 `{object}:{record_id}`（例如 `sys_user:abc123`）"
      },
      parent_id: {
        label: "父评论",
        help: "可选的父评论，用于嵌套回复"
      },
      reply_count: {
        label: "回复数"
      },
      author_id: {
        label: "作者"
      },
      author_name: {
        label: "作者名称"
      },
      author_avatar_url: {
        label: "作者头像"
      },
      body: {
        label: "正文",
        help: "评论文本（支持 Markdown）"
      },
      mentions: {
        label: "提及",
        help: "@mention 对象的 JSON 数组"
      },
      reactions: {
        label: "回应",
        help: "表情回应对象的 JSON 数组"
      },
      is_edited: {
        label: "已编辑"
      },
      edited_at: {
        label: "编辑时间"
      },
      visibility: {
        label: "可见性",
        options: {
          public: "公开",
          internal: "内部",
          private: "私有"
        }
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    }
  },
  sys_attachment: {
    label: "附件",
    pluralLabel: "附件",
    description: "sys_file 与任意其他记录之间的多态关联",
    fields: {
      id: {
        label: "附件 ID"
      },
      parent_object: {
        label: "父对象",
        help: "被附加记录的短对象名（例如 account、lead）"
      },
      parent_id: {
        label: "父记录",
        help: "被附加记录的主键"
      },
      file_id: {
        label: "文件",
        help: "被附加的 sys_file 存储条目"
      },
      file_name: {
        label: "文件名",
        help: "sys_file.name 的去规范化副本，用于快速列表渲染"
      },
      mime_type: {
        label: "MIME 类型"
      },
      size: {
        label: "大小（字节）"
      },
      share_type: {
        label: "共享类型",
        help: "viewer | collaborator | inferred（继承自父记录）",
        options: {
          viewer: "查看者",
          collaborator: "协作者",
          inferred: "推断"
        }
      },
      visibility: {
        label: "可见性",
        options: {
          internal: "内部",
          all_users: "全部用户",
          shared_users: "共享用户"
        }
      },
      uploaded_by: {
        label: "上传人"
      },
      description: {
        label: "描述"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    }
  },
  sys_notification: {
    label: "通知",
    pluralLabel: "通知",
    description: "按用户存储的通知收件箱条目",
    fields: {
      id: {
        label: "通知 ID"
      },
      topic: {
        label: "Topic",
        help: "Notification topic, e.g. task.assigned, collab.mention"
      },
      payload: {
        label: "Payload",
        help: "Template inputs carried to channels (title/body/url/actor/source/…)"
      },
      severity: {
        label: "Severity",
        help: "Severity hint for rendering / filtering",
        options: {
          info: "info",
          warning: "warning",
          critical: "critical"
        }
      },
      dedup_key: {
        label: "Dedup Key",
        help: "Idempotency key within a topic window; a repeat emit is a no-op"
      },
      source_object: {
        label: "来源对象",
        help: "关联记录的对象名称（例如 lead、opportunity）"
      },
      source_id: {
        label: "来源记录",
        help: "source_object 中的记录 ID"
      },
      actor_id: {
        label: "执行人",
        help: "触发该通知的用户（提及人、分配人）"
      },
      created_at: {
        label: "创建时间"
      }
    },
    _views: {
      recent: {
        label: "Recent"
      },
      by_topic: {
        label: "By Topic"
      }
    }
  },
  sys_email: {
    label: "邮件",
    pluralLabel: "邮件",
    description: "外发邮件投递日志",
    fields: {
      id: {
        label: "邮件 ID"
      },
      message_id: {
        label: "Message-ID",
        help: "传输层分配的 RFC-5322 Message-ID"
      },
      from_address: {
        label: "发件人"
      },
      to_addresses: {
        label: "收件人",
        help: "以逗号分隔的收件人地址"
      },
      cc_addresses: {
        label: "抄送"
      },
      bcc_addresses: {
        label: "密送"
      },
      reply_to: {
        label: "回复地址"
      },
      subject: {
        label: "主题"
      },
      body_text: {
        label: "正文（文本）"
      },
      body_html: {
        label: "正文（HTML）"
      },
      status: {
        label: "状态",
        help: "生命周期状态——在调用传输层之前由 IEmailService.send 排队",
        options: {
          queued: "排队中",
          sent: "已发送",
          failed: "失败"
        }
      },
      error: {
        label: "错误",
        help: "status=failed 时的传输错误信息"
      },
      attempt_count: {
        label: "尝试次数",
        help: "服务执行的投递尝试次数"
      },
      sent_at: {
        label: "发送时间",
        help: "当状态切换为 `sent` 时设置"
      },
      related_object: {
        label: "关联对象",
        help: "关联记录的对象名称（例如 lead、opportunity）"
      },
      related_id: {
        label: "关联记录",
        help: "related_object 中的记录 ID"
      },
      sent_by: {
        label: "发送人"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    }
  },
  sys_email_template: {
    label: "邮件模板",
    pluralLabel: "邮件模板",
    description: "按名称 + 语言解析的外发邮件模板（主题、正文和变量）",
    fields: {
      id: {
        label: "ID"
      },
      name: {
        label: "名称",
        help: "点分隔的 snake_case 标识（例如 auth.password_reset）"
      },
      label: {
        label: "标签",
        help: "在 Studio 中显示的人类可读名称"
      },
      category: {
        label: "分类",
        options: {
          auth: "认证",
          notification: "通知",
          workflow: "工作流",
          marketing: "营销",
          custom: "自定义"
        }
      },
      locale: {
        label: "语言区域",
        help: "BCP-47 语言区域标签（en-US、zh-CN 等）"
      },
      description: {
        label: "描述"
      },
      subject: {
        label: "主题",
        help: "主题模板；支持 {{var.path}} 占位符"
      },
      body_html: {
        label: "HTML 正文",
        help: "HTML 正文模板；支持 {{var.path}} 占位符"
      },
      body_text: {
        label: "纯文本正文",
        help: "可选的纯文本替代内容（为空时从 HTML 自动生成）"
      },
      from_name: {
        label: "发件人名称"
      },
      from_address: {
        label: "发件地址"
      },
      reply_to: {
        label: "回复地址"
      },
      active: {
        label: "启用"
      },
      is_system: {
        label: "系统模板",
        help: "由插件 / 平台提供；租户可编辑但不应删除"
      },
      variables_json: {
        label: "变量（JSON）",
        help: "形如 {name,type,required,description} 的 JSON 数组"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    }
  },
  sys_saved_report: {
    label: "保存的报表",
    pluralLabel: "保存的报表",
    description: "持久化的 ObjectQL 报表定义——可重复运行并可调度",
    fields: {
      id: {
        label: "报表 ID"
      },
      name: {
        label: "名称"
      },
      description: {
        label: "描述"
      },
      object_name: {
        label: "对象",
        help: "该报表查询的短对象名"
      },
      query_json: {
        label: "查询",
        help: "ObjectQL 查询封装——{ filter, fields, orderBy, limit, groupBy }"
      },
      format: {
        label: "格式",
        help: "IReportService.run() 和邮件摘要使用的渲染格式",
        options: {
          csv: "CSV",
          json: "JSON",
          html_table: "HTML 表格"
        }
      },
      owner_id: {
        label: "所有者",
        help: "拥有该报表定义的用户（决定共享）"
      },
      last_run_at: {
        label: "上次运行时间",
        help: "由 IReportService.run() 在成功执行时写入"
      },
      last_row_count: {
        label: "上次行数"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    }
  },
  sys_report_schedule: {
    label: "报表计划",
    pluralLabel: "报表计划",
    description: "通过邮件周期性投递 sys_saved_report",
    fields: {
      id: {
        label: "计划 ID"
      },
      report_id: {
        label: "报表"
      },
      name: {
        label: "名称",
        help: "摘要的可选标签——用于邮件主题"
      },
      interval_minutes: {
        label: "间隔（分钟）",
        help: "发送频率（1440 = 每日，10080 = 每周）"
      },
      cron_expression: {
        label: "Cron 表达式",
        help: "可选 5/6 段 Cron——存在时覆盖 interval_minutes"
      },
      timezone: {
        label: "时区"
      },
      active: {
        label: "启用"
      },
      recipients: {
        label: "收件人",
        help: "以逗号分隔的邮箱地址"
      },
      format: {
        label: "格式",
        help: "渲染格式——csv 作为附件，html_table 内嵌在正文中",
        options: {
          csv: "CSV",
          html_table: "HTML 表格"
        }
      },
      subject_template: {
        label: "主题模板",
        help: "邮件主题；会替换 {{name}} / {{date}} / {{rows}}"
      },
      owner_id: {
        label: "所有者"
      },
      next_run_at: {
        label: "下次运行时间",
        help: "调度器会加载 next_run_at <= now 的计划"
      },
      last_sent_at: {
        label: "上次发送时间"
      },
      last_status: {
        label: "最近状态",
        options: {
          ok: "成功",
          failed: "失败",
          skipped: "已跳过"
        }
      },
      last_error: {
        label: "最近错误"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    }
  },
  sys_job: {
    label: "后台任务",
    pluralLabel: "后台任务",
    description: "已注册后台任务目录",
    fields: {
      id: {
        label: "任务 ID"
      },
      name: {
        label: "任务名称",
        help: "唯一任务标识（snake_case）"
      },
      schedule_type: {
        label: "调度类型",
        options: {
          cron: "Cron",
          interval: "间隔",
          once: "一次"
        }
      },
      schedule_expression: {
        label: "表达式",
        help: "Cron 表达式 / 间隔毫秒 / ISO 日期时间"
      },
      timezone: {
        label: "时区"
      },
      active: {
        label: "启用",
        help: "调度器当前是否运行该任务"
      },
      last_run_at: {
        label: "最近运行时间"
      },
      last_status: {
        label: "最近状态",
        options: {
          success: "成功",
          failed: "失败",
          timeout: "超时",
          running: "运行中"
        }
      },
      last_error: {
        label: "最近错误"
      },
      run_count: {
        label: "运行次数"
      },
      failure_count: {
        label: "失败次数"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    }
  },
  sys_job_run: {
    label: "任务执行",
    pluralLabel: "任务执行",
    description: "后台任务执行审计记录",
    fields: {
      id: {
        label: "执行 ID"
      },
      job_name: {
        label: "任务"
      },
      status: {
        label: "状态",
        options: {
          running: "运行中",
          success: "成功",
          failed: "失败",
          timeout: "超时"
        }
      },
      started_at: {
        label: "开始时间"
      },
      completed_at: {
        label: "完成时间"
      },
      duration_ms: {
        label: "耗时（毫秒）"
      },
      attempt: {
        label: "尝试",
        help: "首次运行为 1，重试/重放则 >1"
      },
      trigger: {
        label: "触发方式",
        options: {
          schedule: "调度",
          manual: "手动",
          replay: "重放"
        }
      },
      error: {
        label: "错误"
      },
      created_at: {
        label: "创建时间"
      }
    }
  },
  sys_job_queue: {
    label: "任务队列消息",
    pluralLabel: "任务队列消息",
    description: "持久化任务/消息队列，包含死信消息",
    fields: {
      id: {
        label: "消息 ID"
      },
      queue: {
        label: "队列",
        help: "逻辑队列名称（snake_case）"
      },
      idempotency_key: {
        label: "幂等键",
        help: "在 (queue, window) 范围内去重的键"
      },
      payload_json: {
        label: "负载（JSON）",
        help: "序列化的消息体"
      },
      metadata_json: {
        label: "元数据（JSON）",
        help: "序列化的元数据包（tenant_id、source_record 等）"
      },
      status: {
        label: "状态",
        help: "生命周期状态",
        options: {
          pending: "待处理",
          running: "运行中",
          completed: "已完成",
          failed: "失败",
          dlq: "死信队列"
        }
      },
      priority: {
        label: "优先级",
        help: "数值越低优先级越高"
      },
      attempts: {
        label: "尝试次数"
      },
      max_attempts: {
        label: "最大尝试次数"
      },
      backoff_type: {
        label: "退避策略",
        options: {
          fixed: "固定",
          exponential: "指数"
        }
      },
      backoff_delay_ms: {
        label: "退避基数（毫秒）"
      },
      backoff_max_delay_ms: {
        label: "退避上限（毫秒）"
      },
      scheduled_for: {
        label: "计划执行时间",
        help: "工作进程可领取该消息的最早时间"
      },
      locked_by: {
        label: "锁定者",
        help: "持有租约的工作进程 ID"
      },
      locked_until: {
        label: "锁定到",
        help: "租约到期时间；超过后其他工作进程可重新领取"
      },
      last_error: {
        label: "最近错误"
      },
      completed_at: {
        label: "完成时间"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      }
    }
  },
  sys_metadata: {
    label: "系统元数据",
    pluralLabel: "系统元数据",
    description: "存储平台级和用户级元数据记录（对象、视图、流程等）",
    fields: {
      id: {
        label: "ID"
      },
      name: {
        label: "名称"
      },
      type: {
        label: "元数据类型"
      },
      namespace: {
        label: "命名空间"
      },
      package_id: {
        label: "包 ID",
        help: "遗留包清单 ID 字符串。新记录请使用 package_version_id。"
      },
      package_version_id: {
        label: "包版本",
        help: "指向 sys_package_version（UUID）的外键。Null = 平台内置或环境级覆盖。"
      },
      managed_by: {
        label: "管理方",
        options: {
          package: "包",
          platform: "平台",
          user: "用户"
        }
      },
      scope: {
        label: "范围",
        options: {
          system: "系统",
          platform: "平台",
          user: "用户"
        }
      },
      metadata: {
        label: "元数据",
        help: "元数据负载的 JSON 序列化内容"
      },
      extends: {
        label: "继承自"
      },
      strategy: {
        label: "策略",
        options: {
          merge: "合并",
          replace: "替换"
        }
      },
      owner: {
        label: "所有者"
      },
      state: {
        label: "状态",
        options: {
          draft: "草稿",
          active: "启用",
          archived: "已归档",
          deprecated: "已废弃"
        }
      },
      organization_id: {
        label: "组织",
        help: "用于多租户隔离的组织。"
      },
      environment_id: {
        label: "项目（已废弃）",
        help: "已废弃。请使用 organization_id 进行租户隔离。"
      },
      version: {
        label: "版本"
      },
      checksum: {
        label: "校验和"
      },
      source: {
        label: "来源",
        options: {
          filesystem: "文件系统",
          database: "数据库",
          api: "API",
          migration: "迁移"
        }
      },
      tags: {
        label: "标签",
        help: "分类标签的 JSON 序列化数组"
      },
      created_by: {
        label: "创建人"
      },
      created_at: {
        label: "创建时间"
      },
      updated_by: {
        label: "更新人"
      },
      updated_at: {
        label: "更新时间"
      }
    },
    _views: {
      only_objects: {
        label: "对象"
      },
      only_fields: {
        label: "字段"
      },
      all_metadata: {
        label: "全部"
      }
    }
  },
  sys_metadata_history: {
    label: "元数据历史",
    pluralLabel: "元数据历史",
    description: "元数据变更的版本历史与审计记录",
    fields: {
      id: {
        label: "ID"
      },
      event_seq: {
        label: "事件序号",
        help: "按组织的单调递增事件日志游标。"
      },
      name: {
        label: "名称"
      },
      type: {
        label: "元数据类型"
      },
      version: {
        label: "版本"
      },
      operation_type: {
        label: "操作类型",
        options: {
          create: "创建",
          update: "更新",
          publish: "发布",
          revert: "回滚",
          delete: "删除"
        }
      },
      metadata: {
        label: "元数据",
        help: "该版本对应的元数据快照（JSON 序列化）"
      },
      checksum: {
        label: "校验和"
      },
      previous_checksum: {
        label: "上一个校验和"
      },
      change_note: {
        label: "变更说明",
        help: "对该版本变更内容的说明"
      },
      source: {
        label: "来源"
      },
      organization_id: {
        label: "组织",
        help: "用于多租户隔离的组织。"
      },
      recorded_by: {
        label: "记录人"
      },
      recorded_at: {
        label: "记录时间"
      }
    }
  },
  sys_view_definition: {
    label: "视图定义",
    pluralLabel: "视图定义",
    description: "运行时创建的视图定义（共享/个人层）。软件包层由源代码提供。",
    fields: {
      id: {
        label: "ID"
      },
      name: {
        label: "名称"
      },
      object: {
        label: "对象"
      },
      view_kind: {
        label: "视图类型",
        options: {
          list: "列表",
          form: "表单"
        }
      },
      label: {
        label: "标签"
      },
      is_default: {
        label: "默认视图"
      },
      view_order: {
        label: "排序"
      },
      scope: {
        label: "范围",
        options: {
          shared: "共享",
          personal: "个人"
        }
      },
      owner: {
        label: "所有者"
      },
      hidden: {
        label: "隐藏"
      },
      config: {
        label: "配置",
        help: "ListView 或 FormView 配置（与规范 ViewItem.config 一致）。"
      },
      organization_id: {
        label: "组织",
        help: "用于多租户隔离的组织。"
      },
      state: {
        label: "状态",
        options: {
          draft: "草稿",
          active: "活动",
          archived: "已归档"
        }
      },
      created_by: {
        label: "创建人"
      },
      created_at: {
        label: "创建时间"
      },
      updated_by: {
        label: "更新人"
      },
      updated_at: {
        label: "更新时间"
      }
    }
  },
  sys_metadata_audit: {
    label: "元数据审计",
    pluralLabel: "元数据审计",
    description: "元数据写入决策的仅追加审计记录（ADR-0010）。",
    fields: {
      id: {
        label: "ID"
      },
      occurred_at: {
        label: "发生时间"
      },
      actor: {
        label: "操作者",
        help: "操作主体——用户 ID、系统 ID 或 \"system\"。"
      },
      source: {
        label: "来源"
      },
      type: {
        label: "元数据类型"
      },
      name: {
        label: "名称"
      },
      organization_id: {
        label: "组织"
      },
      operation: {
        label: "操作",
        options: {
          save: "保存",
          publish: "发布",
          rollback: "回滚",
          delete: "删除",
          reset: "重置"
        }
      },
      outcome: {
        label: "结果",
        options: {
          allowed: "允许",
          denied: "拒绝",
          forced: "强制执行"
        }
      },
      code: {
        label: "代码"
      },
      lock_state: {
        label: "锁定状态",
        options: {
          none: "无",
          nooverlay: "no-overlay",
          nodelete: "no-delete",
          full: "完全锁定"
        }
      },
      lock_overridden: {
        label: "锁定已被覆盖"
      },
      request_id: {
        label: "请求 ID"
      },
      note: {
        label: "备注"
      }
    }
  },
  sys_setting: {
    label: "设置",
    pluralLabel: "设置",
    description: "为 SettingsManifest 合约提供支持的通用键值存储。",
    fields: {
      id: {
        label: "设置 ID"
      },
      created_at: {
        label: "创建时间"
      },
      updated_at: {
        label: "更新时间"
      },
      namespace: {
        label: "命名空间",
        help: "Manifest 命名空间（例如 mail、branding、feature_flags）。"
      },
      key: {
        label: "键",
        help: "命名空间内的标识键（snake_case）。"
      },
      scope: {
        label: "范围",
        help: "该记录所属的配置解析层级。",
        options: {
          global: "全局",
          tenant: "租户",
          user: "用户",
          runtime: "运行时"
        }
      },
      user_id: {
        label: "用户",
        help: "当 scope=user 时对应所属用户；否则为 null。"
      },
      value: {
        label: "值",
        help: "JSON 编码的值。encrypted=true 时为 Null（见 value_enc）。"
      },
      encrypted: {
        label: "已加密",
        help: "为 true 时，值会以静态加密方式存储在 value_enc 中；value 列为 null。"
      },
      locked: {
        label: "已锁定",
        help: "为 true 时，较低范围的记录无法覆盖该值；对较低范围的写入会返回 409。平台管理员可借此为所有租户固定全局值（Phase 2 级联）。"
      },
      locked_reason: {
        label: "锁定原因",
        help: "当 locked=true 时，在 UI 提示中展示的人类可读说明。"
      },
      value_enc: {
        label: "加密值",
        help: "密文负载（KMS 包裹）。仅在 encrypted=true 时设置。"
      },
      updated_by: {
        label: "更新人",
        help: "最近通过 SettingsService.set() 写入该记录的执行人。"
      }
    },
    _views: {
      by_namespace: {
        label: "按命名空间"
      },
      tenant_only: {
        label: "租户"
      },
      user_only: {
        label: "用户"
      },
      all_settings: {
        label: "全部"
      }
    }
  },
  sys_secret: {
    label: "密钥",
    pluralLabel: "密钥",
    description: "由 sys_setting 句柄引用的密文存储。绝不保存明文。",
    fields: {
      id: {
        label: "ID",
        help: "由 `sys_setting.value_enc` 引用的不透明句柄。"
      },
      created_at: {
        label: "创建时间",
        help: "首次写入该密文的时间。"
      },
      rotated_at: {
        label: "轮换时间",
        help: "最近一次使用新 KMS 密钥重新包裹该密文的时间。"
      },
      namespace: {
        label: "命名空间",
        help: "该密钥所属的设置命名空间。"
      },
      key: {
        label: "键",
        help: "命名空间内的标识键。"
      },
      kms_key_id: {
        label: "KMS 密钥 ID",
        help: "外部 KMS 句柄（ARN、GCP resource id 或 `local`）。"
      },
      alg: {
        label: "算法",
        help: "密文 / AEAD 算法标记。"
      },
      version: {
        label: "版本",
        help: "每次 rotateKey() 重新包裹该记录时递增。"
      },
      ciphertext: {
        label: "密文",
        help: "提供方编码后的密文数据（base64 / JSON）。实现定义；仅匹配的 ICryptoProvider 可读取。"
      }
    }
  },
  sys_setting_audit: {
    label: "设置审计记录",
    pluralLabel: "设置审计",
    description: "SettingsService 变更的追加写入审计记录。",
    fields: {
      id: {
        label: "ID"
      },
      created_at: {
        label: "创建时间",
        help: "记录该变更的时间。"
      },
      namespace: {
        label: "命名空间"
      },
      key: {
        label: "键"
      },
      scope: {
        label: "范围",
        help: "该记录写入的级联层。",
        options: {
          global: "全局",
          tenant: "租户",
          user: "用户"
        }
      },
      action: {
        label: "操作",
        help: "变更类型。",
        options: {
          set: "设置",
          reset: "重置",
          lock: "锁定",
          unlock: "解锁",
          rotate: "轮换"
        }
      },
      actor_id: {
        label: "执行人",
        help: "执行该变更的用户；系统任务时为 null。"
      },
      source: {
        label: "来源",
        help: "变更入口。",
        options: {
          ui: "UI",
          api: "API",
          migration: "迁移",
          import: "导入",
          system: "系统"
        }
      },
      reason: {
        label: "原因",
        help: "执行人提供的自由文本说明（可选）。"
      },
      old_hash: {
        label: "旧哈希",
        help: "旧值（规范化后）的 SHA-256。此前未设置时为 Null。"
      },
      new_hash: {
        label: "新哈希",
        help: "新值（规范化后）的 SHA-256。重置时为 Null。"
      },
      encrypted: {
        label: "已加密",
        help: "当字段包含密钥材料时为 true（轮换更值得关注）。"
      },
      request_id: {
        label: "请求 ID",
        help: "与 sys_audit_log / tracing 关联。"
      }
    }
  }
};
