# com.kosora623.pikkles.exchange

> Published by [kosora623.bsky.social](https://lexicon.garden/identity/did:plc:mi67np3wgmwyjtqmgy3l5y2m)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mi67np3wgmwyjtqmgy3l5y2m/com.kosora623.pikkles.exchange)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mi67np3wgmwyjtqmgy3l5y2m/com.kosora623.pikkles.exchange/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mi67np3wgmwyjtqmgy3l5y2m/com.kosora623.pikkles.exchange/examples)

## Definitions

### `com.kosora623.pikkles.exchange`

**Type**: `record`

交換の記録。交換した2人がそれぞれ自分のPDSに書く。

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `createdAt` | `string` (datetime) | Yes |  |
| `gave` | `ref` → `com.atproto.repo.strongRef` | Yes | 自分が渡したステッカー |
| `message` | `string` | No | この交換で相手に渡す一言（任意）。渡す側が自分の記録に書く。成立の照合には使わない |
| `occasion` | `string` | No | 交換した場面（任意、手入力。位置情報ではない）。サーバーが持つセッションの値をそのまま入れる |
| `partner` | `string` (did) | Yes | 交換相手のDID |
| `received` | `ref` → `com.atproto.repo.strongRef` | Yes | 受け取ったステッカー |
| `sessionId` | `string` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "交換の記録。交換した2人がそれぞれ自分のPDSに書く。",
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "gave": {
            "description": "自分が渡したステッカー",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "message": {
            "description": "この交換で相手に渡す一言（任意）。渡す側が自分の記録に書く。成立の照合には使わない",
            "maxGraphemes": 100,
            "maxLength": 1000,
            "type": "string"
          },
          "occasion": {
            "description": "交換した場面（任意、手入力。位置情報ではない）。サーバーが持つセッションの値をそのまま入れる",
            "maxGraphemes": 50,
            "maxLength": 500,
            "type": "string"
          },
          "partner": {
            "description": "交換相手のDID",
            "format": "did",
            "type": "string"
          },
          "received": {
            "description": "受け取ったステッカー",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "sessionId": {
            "maxLength": 128,
            "type": "string"
          }
        },
        "required": [
          "sessionId",
          "partner",
          "gave",
          "received",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "com.kosora623.pikkles.exchange",
  "lexicon": 1
}
```
