Skip to content

Instantly share code, notes, and snippets.

@KScaesar
Last active July 1, 2024 02:08
Show Gist options
  • Select an option

  • Save KScaesar/ac99afc9b2f9ff78b508f6e883cfa337 to your computer and use it in GitHub Desktop.

Select an option

Save KScaesar/ac99afc9b2f9ff78b508f6e883cfa337 to your computer and use it in GitHub Desktop.
data schema example

說明

委刊項(campaign)通常指的是一個有計畫、有組織的廣告活動或宣傳活動。 這些活動通常是為了達成特定的市場目標或促進產品或服務的銷售而設計的。 一個廣告委刊項可能包括多種媒體形式,如電視、網路、報紙、廣播、社交媒體等,並且會有特定的時間框架和預算。

Redis Data Schema

key XXX

說明:


schema:

# (V) kind of the resource
kind: string
# (X) maximum number of resources to return
limit: int
# (X) offset for the resource list
offset: int

# (V)
payload:
  - {
      # (V)
      id: int
      # (V)
      name: string
      # (V)
      email: string
      # (V)
      age: int
    }

# (X)
metadata:
  # (X) device ID associated with the resource
  device_id: string

example:

{
  "kind": "user",
  "limit": 10,
  "offset": 0,
  "payload": [
    {
      "id": 1,
      "name": "John Doe",
      "email": "[email protected]",
      "age": 30
    }
  ],
  "metadata": {
    "device_id": "ABC123XYZ"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment