# pet.trezy.tier

> Published by [trezy.pet](https://lexicon.garden/identity/did:plc:ollch4g7tes2reb5eceiwuol)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.tier)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.tier/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ollch4g7tes2reb5eceiwuol/pet.trezy.tier/examples)

## Definitions

### `pet.trezy.tier`

**Type**: `record`

A rarity tier and its base price, published in the game's own repo (did:plc:ollch4g7tes2reb5eceiwuol). No prices live in code at all, so repricing is publishing a record. Only records from that DID are ever read — record.index:pet.trezy.tier refuses the rest, and a forged tier reprices every species in it at once.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes | Matches the `tier` on a species record. Renaming one orphans every species pointing at it, and an orphaned species is unpriceable rather than cheap — createPet refuses the sale. |
| `rank` | `integer` | Yes | Sort order, ascending by value. Leaves gaps for tiers inserted later. |
| `color` | `string` | No | Hex, for the shop and anywhere else a tier is shown. Optional because nothing reads it yet; it is here so adding it later does not mean re-publishing every record. |
| `price` | `integer` | Yes | The base price in coins for species in this tier. Safe to change at any time, including downward: the ledger stores the price actually paid, never a live lookup. |
| `displayName` | `string` | Yes |  |

## Raw Schema

```json
{
  "id": "pet.trezy.tier",
  "defs": {
    "main": {
      "key": "any",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "id",
          "displayName",
          "price",
          "rank"
        ],
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 64,
            "description": "Matches the `tier` on a species record. Renaming one orphans every species pointing at it, and an orphaned species is unpriceable rather than cheap — createPet refuses the sale."
          },
          "rank": {
            "type": "integer",
            "minimum": 0,
            "description": "Sort order, ascending by value. Leaves gaps for tiers inserted later."
          },
          "color": {
            "type": "string",
            "maxLength": 32,
            "description": "Hex, for the shop and anywhere else a tier is shown. Optional because nothing reads it yet; it is here so adding it later does not mean re-publishing every record."
          },
          "price": {
            "type": "integer",
            "minimum": 0,
            "description": "The base price in coins for species in this tier. Safe to change at any time, including downward: the ledger stores the price actually paid, never a live lookup."
          },
          "displayName": {
            "type": "string",
            "maxLength": 64
          }
        }
      },
      "description": "A rarity tier and its base price, published in the game's own repo (did:plc:ollch4g7tes2reb5eceiwuol). No prices live in code at all, so repricing is publishing a record. Only records from that DID are ever read — record.index:pet.trezy.tier refuses the rest, and a forged tier reprices every species in it at once."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
