Purchase
A Purchase records that a specific AppUser has acquired a specific Game. It is the entitlement record that unlocks library access.
Properties
| Property | Type | Description |
|---|---|---|
Id | int | Primary key |
BuyerId | int | FK → AppUser |
GameId | int | FK → Game |
PricePaidUsd | decimal | Reference price at time of purchase |
PurchasedAtUtc | DateTime | When the purchase was recorded |
Constraints
- Unique index on
(BuyerId, GameId)— a user can only own one copy of each game.
Usage
The Purchase record is created when an Order is fulfilled. It grants the buyer:
- Access to the game in their Library (
/library) - Ability to play HTML5 games in-browser
- Ability to download the game zip
- Eligibility to leave a review