{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "/studio/schemas/consent-record-row-1.0.0.json",
  "title": "Consent record row (one line of consent_records.ndjson)",
  "description": "One entry in an exported fan's consent history. The latest entry per purpose is the current state. Synthetic data.",
  "type": "object",
  "required": ["fan_id", "purpose", "state", "source", "recorded_at"],
  "additionalProperties": false,
  "properties": {
    "fan_id": { "type": "string" },
    "purpose": { "type": "string", "enum": ["marketing_email", "push", "partner_offers", "profiling", "audience_extension"] },
    "state": { "type": "boolean", "description": "True is yes, false is no." },
    "source": { "type": "string" },
    "recorded_at": { "type": "string", "format": "date-time" }
  }
}
