# Storage and Schema

## Engagement Structure Defintion

### **Definition in Go Struct**

```go
type Engagement struct {
    Data struct{
      Operation  string `json:"operation"`
      Target     string `json:"target,omitempty"`
      TargetType string `json:"target_type,omitempty"`
      Content    interface `json:"content,omitempty"`
    } `json:"data"`
    SecondaryKey       string `json:"secondary_key,omitempty"`
    Address            string `json:"address"`
    AddressType        string `json:"address_type"`
    SecondarySignature string `json:"secondary_signature"`
    Provider           string `json:"provider"`
    Version            string `json:"version"`
}
```

### Parameter Definition

<table><thead><tr><th width="216.33333333333331">Parameter</th><th>Definition</th><th>Note</th></tr></thead><tbody><tr><td>operation</td><td>The type of engagement</td><td>These values are supported right now: create, follow, like, dislike, comment</td></tr><tr><td>target</td><td>The target of this operation. </td><td>For example, when operation is "<strong>follow</strong>", the target is the user addres, when operation is "<strong>comment</strong>", the target is the txid of the content.</td></tr><tr><td>target_type</td><td>The ID format of the target.</td><td>Right now, "<strong>evm</strong>", "<strong>ar_tx_hash</strong>" are supported</td></tr><tr><td>content</td><td>Based on different operations, it holds different information</td><td></td></tr><tr><td>secondary_key</td><td>The signing secondary key</td><td></td></tr><tr><td>address</td><td>The address of the user</td><td></td></tr><tr><td>address_type</td><td>The type of address</td><td>Right now, "<strong>evm</strong>" is supported</td></tr><tr><td>secondary_signature</td><td>The signature of this data block signed by secondary_key</td><td></td></tr><tr><td>provider</td><td>The SDK or software which generates this data block</td><td></td></tr><tr><td>version</td><td>The version of SDK </td><td></td></tr></tbody></table>

## Example

**create**

```json
{
  "data": {
    "operation": "create",
    "target_type": "ar_tx_hash",
    "content": {
      "language_type": "en",
      "publish_time": 1669536553,
      "title": "title",
      "content": "content"
    }
  },
  "secondary_key": "0x89a04eb167a482659f1b8e0e8c597f69f5b1d4e96652feccf4b01710a45ac6c8",
  "address": "0xF2FCeCEacA2bDC9781fe920Af9Cdc20dB2cea00D",
  "address_type": "evm address",
  "secondary_signature": "0x8778ce9cb1f1ac39627b3effdda0ae48e66e185528ea17825863fb0e710420f8eeecea468e98e7e6f32d93c03a4f12719de578fd86dbf07cb925f0b79023ac01",
  "provider": "readon.me",
  "version": "1.0.01.beta"
}
```

**follow**

```json
{
  "data": {
    "operation": "follow",
    "target": "0x5F5Df3C0AD7579D91127BDC2d112a86273d28fC3",
    "target_type": "evm"
  },
  "secondary_key": "0x89a04eb167a482659f1b8e0e8c597f69f5b1d4e96652feccf4b01710a45ac6c8",
  "address": "0xF2FCeCEacA2bDC9781fe920Af9Cdc20dB2cea00D",
  "address_type": "evm address",
  "secondary_signature": "0xb0c9d00a1417ef6ffc3885e43d98611a5845d59fceddabab4dc4586bd85500f3e2791b83c5a8282a3ebaa9f937c881e0e28037a84061ffe5c6a86db639a3f008",
  "provider": "readon.me",
  "version": "1.0.01.beta"
}
```

**like**

```json
{
  "data": {
    "operation": "like",
    "target": "--Qq0ZpzQenKZAGMebqdvRAL2u1POvRUkh_MzauWxww",
    "target_type": "ar_tx_hash"
  },
  "secondary_key": "0x89a04eb167a482659f1b8e0e8c597f69f5b1d4e96652feccf4b01710a45ac6c8",
  "address": "0xF2FCeCEacA2bDC9781fe920Af9Cdc20dB2cea00D",
  "address_type": "evm address",
  "secondary_signature": "0x5f41dcb2532dc063ece3a9eef2aa89730f5e14e6af3cfa0a91e42371800f58e70442fbe8f8f2bbccdd6c1dc81fd064e0fdab385c35e84e7930b7ec16ff9abb0f",
  "provider": "readon.me",
  "version": "1.0.01.beta"
}
```

**comment**

```json
{
  "data": {
    "operation": "comment",
    "target": "--Qq0ZpzQenKZAGMebqdvRAL2u1POvRUkh_MzauWxww",
    "target_type": "ar_tx_hash",
    "content": {
      "language_type": "en",
      "publish_time": 1669536554,
      "content": "comment content"
    }
  },
  "secondary_key": "0x89a04eb167a482659f1b8e0e8c597f69f5b1d4e96652feccf4b01710a45ac6c8",
  "address": "0xF2FCeCEacA2bDC9781fe920Af9Cdc20dB2cea00D",
  "address_type": "evm address",
  "secondary_signature": "0xb9722091ab506fadcfb1f82bdab381110153a0e180f2f63a7791041fd946699cab1d09747ef14264b8eb709ff619ae1dab7d79ce99d1308e0b5785f12985dd03",
  "provider": "readon.me",
  "version": "1.0.01.beta"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.readon.me/user-engagement/storage-and-schema.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
