> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XStoreCollectionData

> XStoreCollectionData

# XStoreCollectionData

描述用户对特定 SKU 的授权。

## 语法

```cpp theme={null}
typedef struct XStoreCollectionData {  
    time_t acquiredDate;  
    time_t startDate;  
    time_t endDate;  
    bool isTrial;  
    uint32_t trialTimeRemainingInSeconds;  
    uint32_t quantity;  
    const char* campaignId;  
    const char* developerOfferId;  
} XStoreCollectionData  
```

### 成员

*acquiredDate*\
类型：time\_t

获取授权的日期。

*startDate*\
类型：time\_t

授权的开始日期。

*endDate*\
类型：time\_t

授权结束的日期。

*isTrial*\
类型：bool

指示授权是否为试用。

*trialTimeRemainingInSeconds*\
类型：uint32\_t

试用剩余时间。

*quantity*\
类型：uint32\_t

授权中的项目数。对于消耗品，此项表示剩余余额。

*campaignId*\
类型：const char\*

授权的营销活动 ID。

*developerOfferId*\
类型：const char\*

开发人员产品/服务 ID。

## 备注

**XStoreCollectionData** 提供有关商店产品库存量单位 (SKU) 的其他信息。**XStoreCollectionData** 可能引用多种类型的产品或产品集合。因此，如果字段不适用于 SKU，则并非所有字段都具有值。**XStoreCollectionData** 是 [StoreSku](/reference/system/xstore/structs/xstoresku) 结构的成员。

## 要求

**头文件：** XStore.h（包含在 XGameRuntime.h 中）

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 概念文档

* [商店开发授权工具 (DevEntitlementTool.exe)](/tools/tools-services/live-dev-entitlements-tool)

## 另请参阅

[XStore](/reference/system/xstore/xstore_members)\
[XStoreSku](/reference/system/xstore/structs/xstoresku)


## Related topics

- [Store 开发权利工具 (DevEntitlementTool.exe)](/zh-CN/tools/tools-services/live-dev-entitlements-tool.md)
- [XStore](/zh-CN/reference/system/xstore/xstore_members.md)
- [XStoreSku](/zh-CN/reference/system/xstore/structs/xstoresku.md)
- [collections.mp.microsoft.com/v9.0/collections/publisherQuery](/zh-CN/reference/microsoft-store-apis/xstore-v9-query-for-products.md)
- [collections.mp.microsoft.com/v8.0/collections/consume](/zh-CN/reference/microsoft-store-apis/xstore-v8-consume.md)
