关于对象
对象 在 GraphQL 中代表您可以访问的资源。一个对象可以包含一系列字段,这些字段都有特定的类型。
GraphQL 对象类型定义了查询返回的数据结构,每个对象类型包含多个字段,每个字段都有其特定的数据类型。这些对象类型构成了 API 的数据模型,定义了客户端可以获取的数据结构和关系。
在本系统中,对象类型涵盖了内容管理、用户信息、产品数据、评论系统等多个方面的数据结构,为各种业务场景提供统一的数据访问接口。
对象类型分类
本系统中的对象类型主要包括:
- 内容相关对象:如 Archive(文档详情)、ArchiveList(文档列表)、Category(分类信息)等
- 用户相关对象:如 User(用户信息)、UserGroup(用户组)等
- 产品相关对象:如 Sku(产品SKU信息)、ArchiveSku(产品规格SKU信息)等
- 系统设置对象:如 SystemSetting(系统设置)、ContactSetting(联系方式)等
- 交互相关对象:如 Comment(评论)、Review(产品评价)等
每个对象类型都详细列出了其包含的字段和字段说明,便于客户端准确获取所需数据。
Archive
文档详情,包括文章和产品
字段
| 名称 | 说明 |
|---|---|
| allow_oversold (Boolean) | 是否支持超卖 |
| amount (Int) | 金额 |
| brand (String) | 品牌 |
| canonical_url (String) | 规范URL |
| cart_id (Int) | 购物车ID |
| category (Category) | 分类信息 |
| category_id (Int) | 分类ID |
| category_ids (Int) | 分类ID列表 |
| category_titles (String) | 分类标题列表 |
| comment_count (Int) | 评论数量 |
| content (String) | 内容 |
| cost_price (Int) | 成本价 |
| created_time (Int) | 创建时间戳 |
| description (String) | 描述 |
| extra (JSON) | 扩展字段 |
| favorable_price (Int) | 优惠价格 |
| favorite_count (Int) | 收藏数量 |
| fixed_link (String) | 固定链接 |
| flag (String) | 标志 |
| has_order_fields (Boolean) | 是否有订单字段 |
| has_ordered (Boolean) | 是否已下单 |
| has_password (Boolean) | 是否有密码 |
| has_pseudo (Int) | 是否有虚拟销量 |
| id (Int) | 文档ID |
| images (String) | 图片列表 |
| is_favorite (Boolean) | 是否已收藏 |
| is_free_shipping (Boolean) | 是否包邮 |
| is_wholesale (Boolean) | 是否支持批发 |
| keyword_id (Int) | 关键词ID |
| keywords (String) | 关键词 |
| link (String) | 链接 |
| logo (String) | Logo |
| module_id (Int) | 模型ID |
| module_name (String) | 模型名称 |
| need_logistics (Boolean) | 是否需要物流 |
| option_type (Int) | 选项类型 |
| options (ArchiveOption) | 规格选项列表 |
| order_fields (CustomField) | 订单字段列表 |
| order_extra (JSON) | 订单扩展信息 |
| origin_amount (Int) | 原始金额 |
| origin_id (Int) | 原始ID |
| origin_price (Int) | 原始价格 |
| origin_title (String) | 原始标题 |
| origin_url (String) | 原始URL |
| parent_id (Int) | 上级ID |
| password (String) | 密码 |
| password_valid (Boolean) | 密码是否有效 |
| price (Int) | 价格 |
| quantity (Int) | 数量 |
| read_level (Int) | 阅读等级 |
| review_count (Int) | 评价数量 |
| seo_title (String) | SEO标题 |
| sold_count (Int) | 销售数量 |
| sort (Int) | 排序 |
| stock (Int) | 库存 |
| skus (ArchiveSku) | SKU列表 |
| sku (Sku) | 当前选中SKU信息 |
| tags (Tag) | 标签列表 |
| template (String) | 模板 |
| thumb (String) | 缩略图 |
| title (String) | 标题 |
| type (String) | 类型 |
| updated_time (Int) | 更新时间戳 |
| url_token (String) | URL标识符 |
| user_id (Int) | 用户ID |
| video_url (String) | 视频URL |
| views (Int) | 浏览量 |
| weight (Float) | 重量 |
| weight_unit (String) | 重量单位 |
| wholesale_rule (WholesaleRule) | 批发规则 |
| wholesale_rules (WholesaleRule) | 批发规则列表 |
ArchiveList
文档、产品列表,产品的传 module_id=2
字段
| 名称 | 说明 |
|---|---|
| items (Archive) | 文档/产品列表 |
| page (Int) | 页码 |
| total (Int) | 总数 |
ArchiveOption
产品规格名称
字段
| 名称 | 说明 |
|---|---|
| archive_id (Int) | 产品ID |
| created_time (Int) | 创建时间戳 |
| id (Int) | ID |
| is_main (Int) | 是否主选项 |
| sort (Int) | 排序 |
| title (String) | 标题 |
| updated_time (Int) | 更新时间戳 |
| values (ArchiveOptionValue) | 规格值列表 |
ArchiveOptionValue
产品规格选项
字段
| 名称 | 说明 |
|---|---|
| archive_id (Int) | 产品ID |
| color (String) | 颜色 |
| created_time (Int) | 创建时间戳 |
| id (Int) | ID |
| option_id (Int) | 选项ID |
| logo (String) | Logo |
| thumb (String) | 缩略图 |
| price (Int) | 价格 |
| sort (Int) | 排序 |
| title (String) | 标题 |
| updated_time (Int) | 更新时间戳 |
ArchiveSku
产品规格SKU信息
字段
| 名称 | 说明 | |
|---|---|---|
| archive_id (Int) | 产品ID | |
| barcode (String) | 条形码 | |
| cost_price (Int) | 成本价 | |
| created_time (Int) | 创建时间戳 | |
| hs_code (String) | 海关编码 | |
| id (Int) | ID | |
| link (String) | SKU的链接 | |
| logo (String) | Logo | |
| origin_price (Int) | 原价 | |
| price (Int) | 价格 | |
| sku (String) | SKU | |
| sold_count (Int) | 销售数量 | |
| stock (Int) | 库存 | |
| symbol (String) | SKU符号 | |
| thumb (String) | 缩略图 | |
| title (String) | 标题 | |
| updated_time (Int) | 更新时间戳 | |
| weight (Float) | 重量 | |
| weight_unit (String) | 重量单位 | |
BannerItem
首页Banner
字段
| 名称 | 说明 |
|---|---|
| alt (String) | 替代文本 |
| description (String) | 描述 |
| id (Int) | ID |
| link (String) | 链接 |
| logo (String) | Logo |
| type (String) | 类型 |
Category
文档、产品分类
字段
| 名称 | 说明 |
|---|---|
| archive_count (Int) | 文档/产品数量 |
| content (String) | 内容 |
| description (String) | 描述 |
| detail_template (String) | 详情模板 |
| extra (JSON) | 扩展字段 |
| has_children (Boolean) | 是否有子分类 |
| id (Int) | ID |
| images (String) | 图片列表 |
| is_current (Boolean) | 是否当前分类 |
| is_inherit (Int) | 是否继承 |
| keywords (String) | 关键词 |
| link (String) | 链接 |
| logo (String) | Logo |
| module_id (Int) | 模型ID |
| parent_id (Int) | 上级ID |
| seo_title (String) | SEO标题 |
| sort (Int) | 排序 |
| spacer (String) | 间隔符 |
| status (Int) | 状态 |
| template (String) | 模板 |
| thumb (String) | 缩略图 |
| title (String) | 标题 |
| type (Int) | 类型 |
| url_token (String) | URL标识符 |
Comment
评论
字段
| 名称 | 说明 |
|---|---|
| active (Boolean) | 是否活跃 |
| archive_id (Int) | 文档ID |
| content (String) | 评论内容 |
| created_time (Int) | 创建时间戳 |
| id (Int) | ID |
| ip (String) | IP地址 |
| item_title (String) | 文档标题 |
| parent (Comment) | 父评论 |
| parent_id (Int) | 父ID |
| status (Int) | 状态 |
| to_uid (Int) | 目标用户ID |
| user_id (Int) | 用户ID |
| user_name (String) | 用户名 |
| vote_count (Int) | 投票数量 |
CommentList
评论列表
字段
| 名称 | 说明 |
|---|---|
| items (Comment) | 评论列表 |
| page (Int) | 页码 |
| total (Int) | 总数 |
ContactSetting
联系方式
字段
| 名称 | 说明 |
|---|---|
| address (String) | 地址 |
| cellphone (String) | 手机号 |
| email (String) | 邮箱 |
| extra_fields (ExtraField) | 扩展字段列表 |
| facebook (String) | |
| instagram (String) | |
| linkedin (String) | |
| pinterest (String) | |
| qq (String) | |
| qrcode (String) | 二维码 |
| tiktok (String) | TikTok |
| twitter (String) | |
| user_name (String) | 用户名 |
| wechat (String) | 微信 |
| whats_app (String) | |
| youtube (String) | YouTube |
CurrencySetting
货币设置
字段
| 名称 | 说明 |
|---|---|
| currency (String) | 货币码 |
| name (String) | 货币名称 |
| symbol (String) | 货币符号 |
CustomField
自定义字段
字段
| 名称 | 说明 |
|---|---|
| content (String) | 内容 |
| field_name (String) | 字段名 |
| follow_level (Boolean) | 跟随用户组等级 |
| is_filter (Boolean) | 是否筛选 |
| is_system (Boolean) | 是否系统字段 |
| items (String) | 项目列表 |
| name (String) | 名称 |
| required (Boolean) | 是否必填 |
| type (String) | 类型 |
ExtraField
文档扩展字段
字段
| 名称 | 说明 |
|---|---|
| content (String) | 内容 |
| name (String) | 名称 |
| remark (String) | 备注 |
| type (String) | 类型 |
| value (JSON) | 值 |
FilterGroup
文档、产品筛选组
字段
| 名称 | 说明 |
|---|---|
| field_name (String) | 字段名 |
| items (FilterItem) | 筛选项列表 |
| name (String) | 名称 |
| range (Range) | 范围 |
FilterItem
文档、产品筛选项
字段
| 名称 | 说明 |
|---|---|
| is_current (Boolean) | 是否当前项 |
| label (String) | 标签 |
| link (String) | 链接 |
| total (Int) | 总数 |
FriendLink
友情链接
字段
| 名称 | 说明 |
|---|---|
| back_link (String) | 反链 |
| checked_time (Int) | 检查时间戳 |
| contact (String) | 联系方式 |
| id (Int) | ID |
| link (String) | 链接 |
| my_link (String) | 我的链接 |
| my_title (String) | 我的标题 |
| nofollow (Int) | 是否nofollow |
| remark (String) | 备注 |
| sort (Int) | 排序 |
| status (Int) | 状态 |
| title (String) | 标题 |
IndexSetting
首页TDK
字段
| 名称 | 说明 |
|---|---|
| seo_description (String) | SEO描述 |
| seo_keywords (String) | SEO关键词 |
| seo_title (String) | SEO标题 |
Module
模型信息
字段
| 名称 | 说明 |
|---|---|
| description (String) | 描述 |
| id (Int) | ID |
| is_system (Int) | 是否系统模型 |
| keywords (String) | 关键词 |
| link (String) | 链接 |
| name (String) | 名称 |
| status (Int) | 状态 |
| table_name (String) | 表名 |
| title (String) | 标题 |
| title_name (String) | 标题名称 |
| url_token (String) | URL标识符 |
MultiLangSite
多语言站点信息
字段
| 名称 | 说明 |
|---|---|
| base_url (String) | 基础URL |
| id (Int) | ID |
| is_current (Boolean) | 是否当前站点 |
| language (String) | 语言 |
| language_emoji (String) | 语言表情符号 |
| language_icon (String) | 语言图标 |
| language_name (String) | 语言名称 |
| link (String) | 链接 |
| name (String) | 名称 |
| parent_id (Int) | 父ID |
| status (Boolean) | 状态 |
| sync_time (Int) | 同步时间戳 |
Nav
导航信息
字段
| 名称 | 说明 |
|---|---|
| description (String) | 描述 |
| id (Int) | ID |
| is_current (Boolean) | 是否当前导航 |
| level (Int) | 级别 |
| link (String) | 链接 |
| logo (String) | Logo |
| nav_list (Nav) | 导航列表 |
| nav_type (Int) | 导航类型 |
| page_id (Int) | 页面ID |
| parent_id (Int) | 父ID |
| sort (Int) | 排序 |
| spacer (String) | 间隔符 |
| status (Int) | 状态 |
| style (String) | 样式 |
| sub_title (String) | 副标题 |
| thumb (String) | 缩略图 |
| title (String) | 标题 |
| type_id (Int) | 类型ID |
Page
单页信息
字段
| 名称 | 说明 |
|---|---|
| content (String) | 内容 |
| description (String) | 描述 |
| id (Int) | ID |
| images (String) | 图片列表 |
| is_current (Boolean) | 是否当前页面 |
| keywords (String) | 关键词 |
| link (String) | 链接 |
| logo (String) | Logo |
| seo_title (String) | SEO标题 |
| status (Int) | 状态 |
| thumb (String) | 缩略图 |
| title (String) | 标题 |
| url_token (String) | URL标识符 |
PageMeta
获取当前页面TDK信息
字段
| 名称 | 说明 |
|---|---|
| canonical_url (String) | 规范URL |
| current_page (Int) | 当前页码 |
| description (String) | 描述 |
| image (String) | 图片 |
| keywords (String) | 关键词 |
| module_id (Int) | 模型ID |
| nav_bar (Int) | 导航栏 |
| page_id (Int) | 页面ID |
| page_name (String) | 页面名称 |
| params (JSON) | 参数 |
| status_code (Int) | 状态码 |
| title (String) | 标题 |
| total_pages (Int) | 总页数 |
Range
筛选选项范围,price filter 用到
字段
| 名称 | 说明 |
|---|---|
| max (Int) | 最大值 |
| min (Int) | 最小值 |
| link (String) | 链接 |
Review
产品评价
字段
| 名称 | 说明 |
|---|---|
| archive_id (Int) | 产品ID |
| archive_sku_id (Int) | 产品SKU ID |
| archive_title (String) | 产品标题 |
| avatar_url (String) | 头像URL |
| content (String) | 内容 |
| created_time (Int) | 创建时间戳 |
| email (String) | 邮箱 |
| id (Int) | ID |
| images (String) | 图片列表 |
| ip (String) | IP地址 |
| order_id (String) | 订单ID |
| score (Int) | 评分 |
| sku_title (String) | SKU标题 |
| status (Int) | 状态 |
| user_id (Int) | 用户ID |
| user_name (String) | 用户名 |
ReviewList
产品评价列表
字段
| 名称 | 说明 |
|---|---|
| items (Review) | 评价列表 |
| page (Int) | 页码 |
| total (Int) | 总数 |
Sku
获取产品SKU信息
字段
| 名称 | 说明 |
|---|---|
| currency (String) | 货币 |
| currency_symbol (String) | 货币符号 |
| has_sku (Boolean) | 是否有SKU |
| id (Int) | ID |
| max_price (Int) | 最高价格 |
| min_price (Int) | 最低价格 |
| options (ArchiveOption) | 选项列表 |
| order_count (Int) | 订单数量 |
| price (Int) | 价格 |
| quota_used (Int) | 已用配额 |
| skus (ArchiveSku) | SKU列表 |
| stock (Int) | 库存 |
| thumb (String) | 缩略图 |
| title (String) | 标题 |
| user_limit (Int) | 用户限购数量 |
| wholesale_rules (WholesaleRule) | 批发规则列表 |
SystemSetting
系统设置
字段
| 名称 | 说明 |
|---|---|
| admin_url (String) | 管理员URL |
| ban_spider (Int) | 禁止爬虫 |
| base_url (String) | 基础URL |
| currency (String) | 货币 |
| default_site (Boolean) | 默认站点 |
| extra_fields (ExtraField) | 扩展字段列表 |
| favicon (String) | 网站图标 |
| language (String) | 语言 |
| mobile_url (String) | 移动端URL |
| site_close (Int) | 站点关闭 |
| site_close_tips (String) | 站点关闭提示 |
| site_copyright (String) | 站点版权 |
| site_icp (String) | 站点ICP备案号 |
| site_logo (String) | 站点Logo |
| site_name (String) | 站点名称 |
| template_name (String) | 模板名称 |
| template_type (Int) | 模板类型 |
| template_url (String) | 模板URL |
Tag
文档标签
字段
| 名称 | 说明 |
|---|---|
| category_id (Int) | 分类ID |
| category_title (String) | 分类标题 |
| content (String) | 内容 |
| description (String) | 描述 |
| extra (JSON) | 扩展字段 |
| first_letter (String) | 首字母 |
| id (Int) | ID |
| keywords (String) | 关键词 |
| link (String) | 链接 |
| logo (String) | Logo |
| seo_title (String) | SEO标题 |
| status (Int) | 状态 |
| template (String) | 模板 |
| thumb (String) | 缩略图 |
| title (String) | 标题 |
| url_token (String) | URL标识符 |
TagList
文档标签列表
字段
| 名称 | 说明 |
|---|---|
| items (Tag) | 标签列表 |
| page (Int) | 页码 |
| total (Int) | 总数 |
User
用户信息
字段
| 名称 | 说明 |
|---|---|
| avatar_url (String) | 头像URL |
| balance (Int) | 余额 |
| email (String) | 邮箱 |
| email_verified (Boolean) | 邮箱是否已验证 |
| expire_time (Int) | 过期时间戳 |
| extra (JSON) | 扩展字段 |
| full_avatar_url (String) | 完整头像URL |
| group (UserGroup) | 用户组 |
| group_id (Int) | 用户组ID |
| id (Int) | ID |
| introduce (String) | 介绍 |
| invite_code (String) | 邀请码 |
| is_retailer (Int) | 是否分销员 |
| last_login (Int) | 最后登录时间戳 |
| link (String) | 链接 |
| parent_id (Int) | 上级ID |
| phone (String) | 电话 |
| real_name (String) | 真实姓名 |
| status (Int) | 状态 |
| token (String) | 登录令牌 |
| total_reward (Int) | 总奖励收益 |
| url_token (String) | URL标识符 |
| user_name (String) | 用户名 |
UserGroup
用户组
字段
| 名称 | 说明 |
|---|---|
| description (String) | 描述 |
| favorable_price (Int) | 优惠价格 |
| id (Int) | ID |
| level (Int) | 等级 |
| price (Int) | 价格 |
| setting (UserGroupSetting) | 设置 |
| status (Int) | 状态 |
| title (String) | 用户组名称 |
UserGroupSetting
用户组设置
字段
| 名称 | 说明 |
|---|---|
| content_no_captcha (Boolean) | 发布内容无需验证码 |
| content_no_verify (Boolean) | 发布内容无需验证 |
| discount (Int) | 折扣 |
| expire_day (Int) | 过期天数 |
| parent_reward (Int) | 父级奖励(二级分销员奖励) |
| share_reward (Int) | 分享奖励(三级分销员奖励) |
WholesaleRule
批发规则
字段
| 名称 | 说明 |
|---|---|
| archive_id (Int) | 产品ID |
| created_time (Int) | 创建时间戳 |
| discount_rate (Int) | 折扣率 |
| id (Int) | ID |
| max_quantity (Int) | 最大数量 |
| min_quantity (Int) | 最小数量 |
| sku_id (Int) | SKU ID |
| updated_time (Int) | 更新时间戳 |