# net.anisota.chronicle.expedition.camp

> Published by [anisota.net](https://lexicon.garden/identity/did:plc:lcieujcfkv4jx7gehsvok3pr)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:lcieujcfkv4jx7gehsvok3pr/net.anisota.chronicle.expedition.camp)
- [Documentation](https://lexicon.garden/lexicon/did:plc:lcieujcfkv4jx7gehsvok3pr/net.anisota.chronicle.expedition.camp/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:lcieujcfkv4jx7gehsvok3pr/net.anisota.chronicle.expedition.camp/examples)

## Definitions

### `net.anisota.chronicle.expedition.camp`

**Type**: `record`

Camp record. Created when a user makes camp during an expedition. Updated when camp is broken. References the parent expedition record via AT URI.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `light` | `ref` → `#campLight` | No |  |
| `reason` | `string` | Yes | Why camp was made |
| `status` | `string` | Yes | Whether the camp is currently active or has been broken |
| `brokeAt` | `string` (datetime) | No | When camp was broken (only set when status is 'completed') |
| `campedAt` | `string` (datetime) | Yes | When camp was set up |
| `duration` | `integer` | No | Total camp duration in milliseconds (only set when status is 'completed') |
| `createdAt` | `string` (datetime) | Yes | When the record was created |
| `signature` | `ref` → `#chronicleSignature` | Yes |  |
| `updatedAt` | `string` (datetime) | No | When the record was last updated (set on break camp) |
| `campNumber` | `integer` | No | Sequential camp number within the parent expedition (1, 2, 3...). Combined with expeditionNumber gives e.g. Camp 2.1, Camp 2.3 |
| `conditions` | `ref` → `#campConditions` | No |  |
| `expeditionRef` | `string` (at-uri) | Yes | AT URI of the parent expedition record (net.anisota.chronicle.expedition) |

### `net.anisota.chronicle.expedition.camp#campLight`

**Type**: `object`

Light levels at camp start/end

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `atCamp` | `integer` | No | Light level when camp was made (in minutes) |
| `atBreak` | `integer` | No | Light level when camp was broken (in minutes) |
| `regenerated` | `integer` | No | Light regenerated during camp |

### `net.anisota.chronicle.expedition.camp#campConditions`

**Type**: `object`

Environmental conditions when camp was made

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `weather` | `string` | No | Weather condition when camp was made |
| `lightLevel` | `string` | No | Time-of-day light condition when camp was made |

### `net.anisota.chronicle.expedition.camp#chronicleSignature`

**Type**: `object`

ES256 cryptographic signature proving record authenticity

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `alg` | `string` | Yes | Signing algorithm (ES256) |
| `kid` | `string` | Yes | Key identifier for the signing key |
| `sig` | `string` | Yes | Base64-encoded ES256 signature |
| `nonce` | `string` | Yes | Unique random nonce to prevent replay |
| `version` | `integer` | Yes | Signature schema version |
| `signedAt` | `string` (datetime) | Yes | When the record was signed |

## Raw Schema

```json
{
  "id": "net.anisota.chronicle.expedition.camp",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "expeditionRef",
          "status",
          "campedAt",
          "reason",
          "signature",
          "createdAt"
        ],
        "properties": {
          "light": {
            "ref": "#campLight",
            "type": "ref"
          },
          "reason": {
            "enum": [
              "user_initiated",
              "light_low",
              "stamina_low",
              "conditions_harsh"
            ],
            "type": "string",
            "description": "Why camp was made"
          },
          "status": {
            "enum": [
              "active",
              "completed"
            ],
            "type": "string",
            "description": "Whether the camp is currently active or has been broken"
          },
          "brokeAt": {
            "type": "string",
            "format": "datetime",
            "description": "When camp was broken (only set when status is 'completed')"
          },
          "campedAt": {
            "type": "string",
            "format": "datetime",
            "description": "When camp was set up"
          },
          "duration": {
            "type": "integer",
            "minimum": 0,
            "description": "Total camp duration in milliseconds (only set when status is 'completed')"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "When the record was created"
          },
          "signature": {
            "ref": "#chronicleSignature",
            "type": "ref"
          },
          "updatedAt": {
            "type": "string",
            "format": "datetime",
            "description": "When the record was last updated (set on break camp)"
          },
          "campNumber": {
            "type": "integer",
            "minimum": 1,
            "description": "Sequential camp number within the parent expedition (1, 2, 3...). Combined with expeditionNumber gives e.g. Camp 2.1, Camp 2.3"
          },
          "conditions": {
            "ref": "#campConditions",
            "type": "ref"
          },
          "expeditionRef": {
            "type": "string",
            "format": "at-uri",
            "description": "AT URI of the parent expedition record (net.anisota.chronicle.expedition)"
          }
        }
      },
      "description": "Camp record. Created when a user makes camp during an expedition. Updated when camp is broken. References the parent expedition record via AT URI."
    },
    "campLight": {
      "type": "object",
      "properties": {
        "atCamp": {
          "type": "integer",
          "minimum": 0,
          "description": "Light level when camp was made (in minutes)"
        },
        "atBreak": {
          "type": "integer",
          "minimum": 0,
          "description": "Light level when camp was broken (in minutes)"
        },
        "regenerated": {
          "type": "integer",
          "minimum": 0,
          "description": "Light regenerated during camp"
        }
      },
      "description": "Light levels at camp start/end"
    },
    "campConditions": {
      "type": "object",
      "properties": {
        "weather": {
          "enum": [
            "clear",
            "overcast",
            "rainy",
            "stormy",
            "foggy"
          ],
          "type": "string",
          "description": "Weather condition when camp was made"
        },
        "lightLevel": {
          "enum": [
            "dawn",
            "morning",
            "midday",
            "afternoon",
            "dusk",
            "night",
            "deepnight"
          ],
          "type": "string",
          "description": "Time-of-day light condition when camp was made"
        }
      },
      "description": "Environmental conditions when camp was made"
    },
    "chronicleSignature": {
      "type": "object",
      "required": [
        "sig",
        "alg",
        "kid",
        "signedAt",
        "nonce",
        "version"
      ],
      "properties": {
        "alg": {
          "type": "string",
          "description": "Signing algorithm (ES256)"
        },
        "kid": {
          "type": "string",
          "description": "Key identifier for the signing key"
        },
        "sig": {
          "type": "string",
          "description": "Base64-encoded ES256 signature"
        },
        "nonce": {
          "type": "string",
          "description": "Unique random nonce to prevent replay"
        },
        "version": {
          "type": "integer",
          "description": "Signature schema version"
        },
        "signedAt": {
          "type": "string",
          "format": "datetime",
          "description": "When the record was signed"
        }
      },
      "description": "ES256 cryptographic signature proving record authenticity"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
