# football.tools.formguide.preferences

> Published by [tools.football](https://lexicon.garden/identity/did:plc:gf5c6ljx4funa5dih76gd25t)

✓ This is the authoritative definition for this NSID.

## Description

Per-user preferences for the Form Guide app at https://formguide.tools.football. Singleton record (rkey=self) stored in the user's PDS.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:gf5c6ljx4funa5dih76gd25t/football.tools.formguide.preferences)
- [Documentation](https://lexicon.garden/lexicon/did:plc:gf5c6ljx4funa5dih76gd25t/football.tools.formguide.preferences/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:gf5c6ljx4funa5dih76gd25t/football.tools.formguide.preferences/examples)

## Definitions

### `football.tools.formguide.preferences`

**Type**: `record`

**Key**: `literal:self`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `createdAt` | `string` (datetime) | Yes | When the preferences record was first created. |
| `updatedAt` | `string` (datetime) | No | When the preferences record was last modified. |
| `favoriteTeams` | `array` | No | Teams the user follows. Order is significant — clients should preserve it for display. |

### `football.tools.formguide.preferences#favoriteTeam`

**Type**: `object`

A team the user follows, scoped to a specific league.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | No | Denormalized display name at the time the team was added. Hint for consumers; the league/slug pair is the canonical key. |
| `slug` | `string` | Yes | Team slug — lowercased, hyphenated form of the team's display name. Unique within a league. |
| `league` | `string` | Yes | League slug as used in the Form Guide URL (e.g. mls, nwsl, epl). |
| `addedAt` | `string` (datetime) | No | When this team was added to favorites. |

## Raw Schema

```json
{
  "id": "football.tools.formguide.preferences",
  "defs": {
    "main": {
      "key": "literal:self",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "createdAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "When the preferences record was first created."
          },
          "updatedAt": {
            "type": "string",
            "format": "datetime",
            "description": "When the preferences record was last modified."
          },
          "favoriteTeams": {
            "type": "array",
            "items": {
              "ref": "#favoriteTeam",
              "type": "ref"
            },
            "maxLength": 100,
            "description": "Teams the user follows. Order is significant — clients should preserve it for display."
          }
        }
      }
    },
    "favoriteTeam": {
      "type": "object",
      "required": [
        "league",
        "slug"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 200,
          "description": "Denormalized display name at the time the team was added. Hint for consumers; the league/slug pair is the canonical key."
        },
        "slug": {
          "type": "string",
          "maxLength": 128,
          "description": "Team slug — lowercased, hyphenated form of the team's display name. Unique within a league."
        },
        "league": {
          "type": "string",
          "maxLength": 64,
          "description": "League slug as used in the Form Guide URL (e.g. mls, nwsl, epl)."
        },
        "addedAt": {
          "type": "string",
          "format": "datetime",
          "description": "When this team was added to favorites."
        }
      },
      "description": "A team the user follows, scoped to a specific league."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "description": "Per-user preferences for the Form Guide app at https://formguide.tools.football. Singleton record (rkey=self) stored in the user's PDS."
}
```
