# com.kosora623.pikkles.exchange

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

- Kind: record
- Record key: tid
- Authority: pikkles.kosora623.com
- Lexicon: 1
- Published by [kosora623.bsky.social](https://lexicon.garden/identity/did:plc:mi67np3wgmwyjtqmgy3l5y2m), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:mi67np3wgmwyjtqmgy3l5y2m/com.kosora623.pikkles.exchange)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mi67np3wgmwyjtqmgy3l5y2m/com.kosora623.pikkles.exchange/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mi67np3wgmwyjtqmgy3l5y2m/com.kosora623.pikkles.exchange/analytics)

## Record (`com.kosora623.pikkles.exchange`)

Type: record · key tid

### Properties

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

## 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
}
```
