了解搭配使用 GraphQL 與 AEM - 範例內容和查詢

瞭解如何搭配AEM使用GraphQL,透過探索範例內容和查詢來提供Headless內容。

注意

若要開始使用GraphQL查詢以及它們如何使用AEM內容片段,檢視一些實用的範例會有所幫助。

如需相關幫助,請參閱:

GraphQL - 使用範例內容片段結構的範例查詢

請參閱這些範例查詢,以了解如何建立查詢以及範例結果。

注意

根據您的執行個體,您可以直接存取 AEM GraphQL API隨附的GraphiQL介面 用於提交和測試查詢。

例如:http://localhost:4502/content/graphiql.html

範例查詢 - 所有可用的結構描述和資料類型

此範例查詢會傳回所有 types 用於所有可用的結構描述。

範例查詢

{
  __schema {
    types {
      name
      description
    }
  }
}

範例結果

{
  "data": {
    "__schema": {
      "types": [
        {
          "name": "AdventureModel",
          "description": null
        },
        {
          "name": "AdventureModelArrayFilter",
          "description": null
        },
        {
          "name": "AdventureModelFilter",
          "description": null
        },
        {
          "name": "AdventureModelResult",
          "description": null
        },
        {
          "name": "AdventureModelResults",
          "description": null
        },
        {
          "name": "AllFragmentModels",
          "description": null
        },
        {
          "name": "ArchiveRef",
          "description": null
        },
        {
          "name": "ArrayMode",
          "description": null
        },
        {
          "name": "ArticleModel",
          "description": null
        },

...more results...

        {
          "name": "__EnumValue",
          "description": null
        },
        {
          "name": "__Field",
          "description": null
        },
        {
          "name": "__InputValue",
          "description": null
        },
        {
          "name": "__Schema",
          "description": "A GraphQL Introspection defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, the entry points for query, mutation, and subscription operations."
        },
        {
          "name": "__Type",
          "description": null
        },
        {
          "name": "__TypeKind",
          "description": "An enum describing what kind of type a given __Type is"
        }
      ]
    }
  }
}

範例查詢 - 關於所有城市的所有資訊

若要擷取有關所有城市的所有資訊,您可以使用基本查詢:
範例查詢

{
  cityList {
    items
  }
}

執行時,系統會自動展開查詢以包含所有欄位:

{
  cityList {
    items {
      _path
      name
      country
      population
    }
  }
}

範例結果

{
  "data": {
    "cityList": {
      "items": [
        {
          "_path": "/content/dam/sample-content-fragments/cities/basel",
          "name": "Basel",
          "country": "Switzerland",
          "population": 172258
        },
        {
          "_path": "/content/dam/sample-content-fragments/cities/berlin",
          "name": "Berlin",
          "country": "Germany",
          "population": 3669491
        },
        {
          "_path": "/content/dam/sample-content-fragments/cities/bucharest",
          "name": "Bucharest",
          "country": "Romania",
          "population": 1821000
        },
        {
          "_path": "/content/dam/sample-content-fragments/cities/san-francisco",
          "name": "San Francisco",
          "country": "USA",
          "population": 883306
        },
        {
          "_path": "/content/dam/sample-content-fragments/cities/san-jose",
          "name": "San Jose",
          "country": "USA",
          "population": 1026350
        },
        {
          "_path": "/content/dam/sample-content-fragments/cities/stuttgart",
          "name": "Stuttgart",
          "country": "Germany",
          "population": 634830
        },
        {
          "_path": "/content/dam/sample-content-fragments/cities/zurich",
          "name": "Zurich",
          "country": "Switzerland",
          "population": 415367
        }
      ]
    }
  }
}

範例查詢 - 所有城市的名稱

此範例查詢是直接查詢,可傳回 name中所有專案的 city結構描述。

範例查詢

query {
  cityList {
    items {
      name
    }
  }
}

範例結果

{
  "data": {
    "cityList": {
      "items": [
        {
          "name": "Basel"
        },
        {
          "name": "Berlin"
        },
        {
          "name": "Bucharest"
        },
        {
          "name": "San Francisco"
        },
        {
          "name": "San Jose"
        },
        {
          "name": "Stuttgart"
        },
        {
          "name": "Zurich"
        }
      ]
    }
  }
}

範例查詢 - 單一特定城市片段

此範例查詢是返回存放庫中特定位置單一片段專案詳細資料的查詢。

範例查詢

{
  cityByPath (_path: "/content/dam/sample-content-fragments/cities/berlin") {
    item {
      _path
      name
      country
      population
     categories
    }
  }
}

範例結果

{
  "data": {
    "cityByPath": {
      "item": {
        "_path": "/content/dam/sample-content-fragments/cities/berlin",
        "name": "Berlin",
        "country": "Germany",
        "population": 3669491,
        "categories": [
          "city:capital",
          "city:emea"
        ]
      }
    }
  }
}

範例查詢 - 所有具有名稱變化的城市

如果您建立名為「柏林中心」的變數(berlin_centre),適用於 city 柏林,您可以使用查詢來傳回變數的詳細資訊。

範例查詢

{
  cityList (variation: "berlin_center") {
    items {
      _path
      name
      country
      population
      categories
    }
  }
}

範例結果

{
  "data": {
    "cityList": {
      "items": [
        {
          "_path": "/content/dam/sample-content-fragments/cities/berlin",
          "name": "Berlin",
          "country": "Germany",
          "population": 3669491,
          "categories": [
            "city:capital",
            "city:emea"
          ]
        }
      ]
    }
  }
}

範例查詢 - 所有城市的名稱 已標籤為分行符號

如果您:

  • 建立各種標籤,已命名 TourismBusinessCity BreakHoliday
  • 並將這些標籤指派給各種變數的主變數 City 執行個體

然後,您可以使用查詢來傳回 nametags中所有標示為「城市分隔符號」的專案 city結構描述。

範例查詢

query {
  cityList(
    includeVariations: true,
    filter: {_tags: {_expressions: [{value: "tourism:city-break", _operator: CONTAINS}]}}
  ){
    items {
      name,
      _tags
    }
  }
}

範例結果

{
  "data": {
    "cityList": {
      "items": [
        {
          "name": "Berlin",
          "_tags": [
            "tourism:city-break",
            "tourism:business"
          ]
        },
        {
          "name": "Zurich",
          "_tags": [
            "tourism:city-break",
            "tourism:business"
          ]
        }
      ]
    }
  }
}

範例查詢 - 公司 CEO 和員工的完整詳細資訊

使用巢狀片段的結構,此查詢傳回公司 CEO 及其所有員工的完整詳細資訊。

範例查詢

query {
  companyList {
    items {
      name
      ceo {
        _path
        name
        firstName
        awards {
        id
          title
        }
      }
      employees {
       name
        firstName
       awards {
         id
          title
        }
      }
    }
  }
}

範例結果

{
  "data": {
    "companyList": {
      "items": [
        {
          "name": "Apple Inc.",
          "ceo": {
            "_path": "/content/dam/sample-content-fragments/persons/steve-jobs",
            "name": "Jobs",
            "firstName": "Steve",
            "awards": []
          },
          "employees": [
            {
              "name": "Marsh",
              "firstName": "Duke",
              "awards": []
            },
            {
              "name": "Caulfield",
              "firstName": "Max",
              "awards": [
                {
                  "id": "GB",
                  "title": "Gameblitz"
                }
              ]
            }
          ]
        },
        {
          "name": "Little Pony, Inc.",
          "ceo": {
            "_path": "/content/dam/sample-content-fragments/persons/adam-smith",
            "name": "Smith",
            "firstName": "Adam",
            "awards": []
          },
          "employees": [
            {
              "name": "Croft",
              "firstName": "Lara",
              "awards": [
                {
                  "id": "GS",
                  "title": "Gamestar"
                }
              ]
            },
            {
              "name": "Slade",
              "firstName": "Cutter",
              "awards": [
                {
                  "id": "GB",
                  "title": "Gameblitz"
                },
                {
                  "id": "GS",
                  "title": "Gamestar"
                }
              ]
            }
          ]
        },
        {
          "name": "NextStep Inc.",
          "ceo": {
            "_path": "/content/dam/sample-content-fragments/persons/steve-jobs",
            "name": "Jobs",
            "firstName": "Steve",
            "awards": []
          },
          "employees": [
            {
              "name": "Smith",
              "firstName": "Joe",
              "awards": []
            },
            {
              "name": "Lincoln",
              "firstName": "Abraham",
              "awards": []
            }
          ]
        }
      ]
    }
  }
}

範例查詢 - 所有名稱為「Jobs」或「Smith」的所有人員

此範例查詢篩選全部 persons ,適用於任何擁有名稱的 JobsSmith.

範例查詢

query {
  personList(filter: {
    name: {
      _logOp: OR
      _expressions: [
        {
          value: "Jobs"
        },
        {
          value: "Smith"
        }
      ]
    }
  }) {
    items {
      name
      firstName
    }
  }
}

範例結果

{
  "data": {
    "personList": {
      "items": [
        {
          "name": "Smith",
          "firstName": "Adam"
        },
        {
          "name": "Smith",
          "firstName": "Joe"
        },
        {
          "name": "Jobs",
          "firstName": "Steve"
        }
      ]
    }
  }
}

範例查詢 - 所有名稱不為「Jobs」的人員

此範例查詢篩選全部 persons ,適用於任何擁有名稱的 JobsSmith.

範例查詢

query {
  personList(filter: {
    name: {
      _expressions: [
        {
          value: "Jobs"
          _operator: EQUALS_NOT
        }
      ]
    }
  }) {
    items {
      name
      firstName
    }
  }
}

範例結果

{
  "data": {
    "personList": {
      "items": [
        {
          "name": "Lincoln",
          "firstName": "Abraham"
        },
        {
          "name": "Smith",
          "firstName": "Adam"
        },
        {
          "name": "Slade",
          "firstName": "Cutter"
        },
        {
          "name": "Marsh",
          "firstName": "Duke"
        },
        {
          "name": "Smith",
          "firstName": "Joe"
        },
        {
          "name": "Croft",
          "firstName": "Lara"
        },
        {
          "name": "Caulfield",
          "firstName": "Max"
        }
      ]
    }
  }
}

範例查詢 - 其 _path 以特定前置詞開頭的所有冒險

_path 以特定前置詞 (/content/dam/wknd/en/adventures/cycling) 開頭的所有 adventures

範例查詢

query {
  adventureList(
    filter: {
      _path: {
        _expressions: [
        {
          value: "/content/dam/wknd/en/adventures/cycling"
         _operator: STARTS_WITH
        }]
       }
    })
    {
    items {
      _path
    }
  }
}

範例結果

{
  "data": {
    "adventureList": {
      "items": [
        {
          "_path": "/content/dam/wknd/en/adventures/cycling-southern-utah/cycling-southern-utah"
        },
        {
          "_path": "/content/dam/wknd/en/adventures/cycling-tuscany/cycling-tuscany"
        }
      ]
    }
  }
}

範例查詢 — 德國或瑞士人口為400000到999999的所有城市

在這裡篩選出一組欄位。 AND (隱含) 用於選擇 population 範圍,而 OR (明確) 用於選擇所需城市。

範例查詢

query {
  cityList(filter: {
    population: {
      _expressions: [
        {
          value: 400000
          _operator: GREATER_EQUAL
        }, {
          value: 1000000
          _operator: LOWER
        }
      ]
    },
    country: {
      _logOp: OR
      _expressions: [
        {
          value: "Germany"
        }, {
          value: "Switzerland"
        }
      ]
    }
  }) {
    items {
      name
      population
      country
    }
  }
}

範例結果

{
  "data": {
    "cityList": {
      "items": [
        {
          "name": "Stuttgart",
          "population": 634830,
          "country": "Germany"
        },
        {
          "name": "Zurich",
          "population": 415367,
          "country": "Switzerland"
        }
      ]
    }
  }
}

範例查詢 - 名稱中包含 SAN 的所有城市,不區分大小寫

此查詢會質詢名稱中包含 SAN的所有城市,不區分大小寫。

範例查詢

query {
  cityList(filter: {
    name: {
      _expressions: [
        {
          value: "SAN"
          _operator: CONTAINS
          _ignoreCase: true
        }
      ]
    }
  }) {
    items {
      name
      population
      country
    }
  }
}

範例結果

{
  "data": {
    "cityList": {
      "items": [
        {
          "name": "San Francisco",
          "population": 883306,
          "country": "USA"
        },
        {
          "name": "San Jose",
          "population": 1026350,
          "country": "USA"
        }
      ]
    }
  }
}

範例查詢 - 篩選至少出現一次項目的陣列

此查詢篩選至少出現一次項目 (city:na) 的陣列。

範例查詢

query {
  cityList(filter: {
    categories: {
      _expressions: [
        {
          value: "city:na"
          _apply: AT_LEAST_ONCE
        }
      ]
    }
  }) {
    items {
      name
      population
      country
      categories
    }
  }
}

範例結果

{
  "data": {
    "cityList": {
      "items": [
        {
          "name": "San Francisco",
          "population": 883306,
          "country": "USA",
          "categories": [
            "city:beach",
            "city:na"
          ]
        },
        {
          "name": "San Jose",
          "population": 1026350,
          "country": "USA",
          "categories": [
            "city:na"
          ]
        }
      ]
    }
  }
}

範例查詢 - 篩選確切的陣列值

此查詢會篩選確切的陣列值。

範例查詢

query {
  cityList(filter: {
    categories: {
      _expressions: [
        {
          values: [
            "city:beach",
            "city:na"
          ]
        }
      ]
    }
  }) {
    items {
      name
      population
      country
      categories
    }
  }
}

範例結果

{
  "data": {
    "cityList": {
      "items": [
        {
          "name": "San Francisco",
          "population": 883306,
          "country": "USA",
          "categories": [
            "city:beach",
            "city:na"
          ]
        }
      ]
    }
  }
}

巢狀內容片段的範例查詢 - 至少有一名員工名稱為「Smith」的所有公司

此查詢說明篩選出任何 name 為「Smith」的 person,從兩個巢狀片段 - companyemployee 傳回資訊。

範例查詢

query {
  companyList(filter: {
    employees: {
      _match: {
        name: {
          _expressions: [
            {
              value: "Smith"
            }
          ]
        }
      }
    }
  }) {
    items {
      name
      ceo {
        name
        firstName
      }
      employees {
        name
        firstName
      }
    }
  }
}

範例結果

{
  "data": {
    "companyList": {
      "items": [
        {
          "name": "NextStep Inc.",
          "ceo": {
            "name": "Jobs",
            "firstName": "Steve"
          },
          "employees": [
            {
              "name": "Smith",
              "firstName": "Joe"
            },
            {
              "name": "Lincoln",
              "firstName": "Abraham"
            }
          ]
        }
      ]
    }
  }
}

巢狀內容片段的範例查詢 - 所有員工都獲得「Gamestar」獎項的所有公司

此查詢說明了跨三個巢狀片段 - companyemployeeaward 的篩選作業。

範例查詢

query {
  companyList(filter: {
    employees: {
      _apply: ALL
      _match: {
        awards: {
          _match: {
            id: {
              _expressions: [
                {
                  value: "GS"
                  _operator:EQUALS
                }
              ]
            }
          }
        }
      }
    }
  }) {
    items {
      name
      ceo {
        name
        firstName
      }
      employees {
        name
        firstName
        awards {
          id
          title
        }
      }
    }
  }
}

範例結果

{
  "data": {
    "companyList": {
      "items": [
        {
          "name": "Little Pony, Inc.",
          "ceo": {
            "name": "Smith",
            "firstName": "Adam"
          },
          "employees": [
            {
              "name": "Croft",
              "firstName": "Lara",
              "awards": [
                {
                  "id": "GS",
                  "title": "Gamestar"
                }
              ]
            },
            {
              "name": "Slade",
              "firstName": "Cutter",
              "awards": [
                {
                  "id": "GB",
                  "title": "Gameblitz"
                },
                {
                  "id": "GS",
                  "title": "Gamestar"
                }
              ]
            }
          ]
        }
      ]
    }
  }
}

中繼資料的範例查詢 - 列出 GB 獎項的中繼資料

此查詢說明了跨三個巢狀片段 - companyemployeeaward 的篩選作業。

範例查詢

query {
  awardList(filter: {
      id: {
        _expressions: [
          {
            value:"GB"
          }
        ]
    }
  }) {
    items {
      _metadata {
        stringMetadata {
          name,
          value
        }
      }
      id
      title
    }
  }
}

範例結果

{
  "data": {
    "awardList": {
      "items": [
        {
          "_metadata": {
            "stringMetadata": [
              {
                "name": "title",
                "value": "Gameblitz Award"
              },
              {
                "name": "description",
                "value": ""
              }
            ]
          },
          "id": "GB",
          "title": "Gameblitz"
        }
      ]
    }
  }
}

使用 WKND 專案的範例查詢

這些是根據 WKND 專案的範例查詢。它具有下列功能:

  • 內容片段模型可在以下位置取用:
    http://<hostname>:<port>/libs/dam/cfm/models/console/content/models.html/conf/wknd

  • 內容片段 (和其他內容) 可在以下位置取用:
    http://<hostname>:<port>/assets.html/content/dam/wknd/en

注意

由於結果可能會很龐大,此處不再重現。

具有指定的屬性之特定模型的所有內容片段的範例查詢

此範例查詢會質詢:

  • 類型為 article 的所有內容片段
  • 使用 pathauthor 屬性。

範例查詢

{
  articleList {
    items {
      _path
      author
    }
  }
}

中繼資料的範例查詢

此查詢會質詢:

  • 類型為 adventure 的所有內容片段
  • 中繼資料

範例查詢

{
  adventureList {
    items {
      _path,
      _metadata {
        stringMetadata {
          name,
          value
        }
        stringArrayMetadata {
          name,
          value
        }
        intMetadata {
          name,
          value
        }
        intArrayMetadata {
          name,
          value
        }
        floatMetadata {
          name,
          value
        }
        floatArrayMetadata {
          name,
          value
        }
        booleanMetadata {
          name,
          value
        }
        booleanArrayMetadata {
          name,
          value
        }
        calendarMetadata {
          name,
          value
        }
        calendarArrayMetadata {
          name,
          value
        }
      }
    }
  }
}

給定模型之單一內容片段的範例查詢

此範例查詢會質詢:

  • 在特定路徑中類型為 article 的單一內容片段
    • 在該路徑內,所有格式的內容:
      • HTML
      • Markdown
      • 純文字
      • JSON

範例查詢

{
  articleByPath (_path: "/content/dam/wknd/en/magazine/alaska-adventure/alaskan-adventures") {
    item {
        _path
        author
        main {
          html
          markdown
          plaintext
          json
        }
    }
  }
}

來自模型的內容片段模型的範例查詢

此範例查詢會質詢:

  • 單一內容片段
    • 基礎內容片段模型的詳細資訊

範例查詢

{
  adventureByPath(_path: "/content/dam/wknd/en/adventures/riverside-camping-australia/riverside-camping-australia") {
    item {
      _path
      adventureTitle
      _model {
        _path
        title
      }
    }
  }
}

巢狀內容片段的範例查詢 - 單一模型類型

此查詢會質詢:

  • 在特定路徑中類型為 article 的單一內容片段
    • 在該路徑內,參照(巢狀)片段的路徑和作者
注意

referencearticle 欄位的資料類型為 fragment-reference

範例查詢

{
  adventureByPath(_path: "/content/dam/wknd-shared/en/magazine/western-australia/western-australia-by-camper-van") {
    item {
      _path
      title
      _model {
        _path
        title
      }
    }
  }
}

巢狀內容片段的範例查詢 - 多個模型類型

單一參考的模型類型

此查詢會質詢:

  • 多個類型為 bookmark 的內容片段
    • 具有片段參考,其會參考特定模型類型 Article 的其他片段。
注意

fragments 欄位的資料類型為 fragment-reference,且已選取 Article 模型。查詢將 fragments[Article] 陣列形式傳遞.

{
  bookmarkList {
    items {
        fragments {
          _path
          author
        }
     }
  }
}

多個參考的模型類型

此查詢會質詢:

  • 多個類型為 bookmark 的內容片段
    • 具有片段參考,其會參考特定模型類型 ArticleAdventure 的其他片段。
注意

fragments 欄位的資料類型為 fragment-reference,且已選取 ArticleAdventure 模型。查詢將 fragments[AllFragmentModels] 陣列形式傳遞,其使用聯合類型取消參考。

{
  bookmarkList {
    items {
        fragments {
          ... on ArticleModel {
            _path
            author
          }
          ... on AdventureModel {
            _path
            adventureTitle
          }
        }
     }
  }
}

具有內容參考之特定模型的內容片段的範例查詢

此查詢有兩種形式:

  1. 傳回所有內容參考。
  2. 傳回類型為 attachments 的特定內容參考。

此查詢會質詢:

  • 多個類型為 bookmark 的內容片段
    • 具有對其他片段的內容參考

具有預先擷取之參考的多個內容片段的範例查詢

以下查詢使用 _references 傳回所有內容參考:

{
  bookmarkList {
     _references {
         ... on ImageRef {
          _path
          type
          height
        }
        ... on MultimediaRef {
          _path
          type
          size
        }
        ... on DocumentRef {
          _path
          type
          author
        }
        ... on ArchiveRef {
          _path
          type
          format
        }
    }
    items {
        _path
    }
  }
}

具有附件之多個內容片段的範例查詢

下列查詢會傳回全部 attachments — 型別的特定欄位(子群組) content-reference

注意

attachments 欄位的資料類型為 content-reference,並選擇了各種表單。

{
  bookmarkList {
    items {
      attachments {
        ... on PageRef {
          _path
          type
        }
        ... on ImageRef {
          _path
          width
        }
        ... on MultimediaRef {
          _path
          size
        }
        ... on DocumentRef {
          _path
          author
        }
        ... on ArchiveRef {
          _path
          format
        }
      }
    }
  }
}

具有 RTE 內聯參考的單一內容片段的範例查詢

此查詢會質詢:

  • 在特定路徑中類型為 bookmark 的單一內容片段
    • 其中有 RTE 內聯參考
注意

RTE 內聯參考在 _references 中被序列化。

範例查詢

{
  bookmarkByPath(_path: "/content/dam/wknd/en/bookmarks/skitouring") {
    item {
      _path
      description {
        json
      }
    }
    _references {
      ... on ArticleModel {
        _path
      }
      ... on AdventureModel {
        _path
      }
      ... on ImageRef {
        _path
      }
      ... on MultimediaRef {
        _path
      }
      ... on DocumentRef {
        _path
      }
      ... on ArchiveRef {
        _path
      }
    }
  }
}

給定模型的單一內容片段變化的範例查詢

此查詢會質詢:

  • 在特定路徑中類型為 article 的單一內容片段
    • 在該路徑中,與變數相關的資料: variation1

範例查詢

{
  articleByPath (_path: "/content/dam/wknd/en/magazine/alaska-adventure/alaskan-adventures", variation: "variation1") {
    item {
      _path
      author
      main {
        html
        markdown
        plaintext
        json
      }
    }
  }
}

給定模型之多個內容片段的名稱變化的範例查詢

此查詢會質詢:

  • 類型為 article 的內容片段,具有特定變化:variation1

範例查詢

{
  articleList (variation: "variation1") {
    items {
      _path
      author
      main {
        html
        markdown
        plaintext
        json
      }
    }
  }
}

給定模型的多個內容片段及其變體的範例查詢

此查詢會質詢:

  • 型別為的內容片段 article 和所有變數

範例查詢

query {
  articleList(
    includeVariations: true  ){
    items {
      _variation
      _path
      _tags
      _metadata {
        stringArrayMetadata {
          name
          value
        }
      }
    }
  }
}

附加特定標籤之指定模型的內容片段變體範例查詢

此查詢會質詢:

  • 型別為的內容片段 article 一或多個具有標籤的變數 WKND : Activity / Hiking

範例查詢

{
  articleList(
    includeVariations: true,
    filter: {_tags: {_expressions: [{value: "wknd:activity/hiking", _operator: CONTAINS}]}}
  ){
    items {
      _variation
      _path
      _tags
      _metadata {
        stringArrayMetadata {
          name
          value
        }
      }
    }
  }
}

給定地區設定的多個內容片段的範例查詢

此查詢會質詢:

  • fr 地區設定中類型為 article 的內容片段

範例查詢

{
  articleList (_locale: "fr") {
    items {
      _path
      author
      main {
        html
        markdown
        plaintext
        json
      }
    }
  }
}

範例內容片段結構 (與 GraphQL 搭配使用)

這些範例查詢是根據以下結構,該結構使用:

範例內容片段結構 (結構描述)

對於範例查詢,請使用以下內容模型及其相互關係(參照 — >):

公司

定義公司的基本欄位是:

欄位名稱 資料類型 參考
公司名稱 單行文字
CEO 片段參考 (單一) 人員
員工 片段參考 (多個欄位) 人員

人員

定義人員的欄位,人員也可以是員工:

欄位名稱 資料類型 參考
名稱 單行文字
名字 單行文字
獎項 片段參考 (多個欄位) 獎項

獎項

定義獎項的欄位是:

欄位名稱 資料類型 參考
快速鍵/ID 單行文字
標題 單行文字

城市

定義城市的名稱是:

欄位名稱 資料類型 參考
名稱 單行文字
國家/地區 單行文字
人口 數字
類別 標記

範例內容片段

以下片段用於適當的模型。

公司

公司名稱 CEO 員工
Apple Steve Jobs Duke Marsh
Max Caulfield
Little Pony Inc. Adam Smith Lara Croft
Cutter Slade
NextStep Inc. Steve Jobs Joe Smith
Abe Lincoln

人員

名稱 名字 獎項
Lincoln Abe
Smith Adam
Slade Cutter Gameblitz
Gamestar
Marsh Duke
Smith Joe
Croft Lara Gamestar
Caulfield 最大值 Gameblitz
工作 Steve

獎項

快速鍵/ID 標題
GB Gameblitz
GS Gamestar
OSC Oscar

城市

名稱 國家/地區 人口 類別
巴塞爾 瑞士 172258 city:emea
柏林 德國 3669491 city:capital
city:emea
布加勒斯特 羅馬尼亞 1821000 city:capital
city:emea
舊金山 美國 883306 city:beach
city:na
聖荷西 美國 102635 city:na
斯圖加特 德國 634830 city:emea
蘇黎世 瑞士 415367 city:capital
city:emea

本頁內容