Transaction Action of GS2-Lottery

VerifyAction

ConsumeAction

AcquireAction

Gs2Lottery:DrawByUserId

Drawing lots by specifying user IDs

Actions for which quantity can be specified: YES

Reversible action: NO

TypeDescription
namespaceNamestringNamespace name
lotteryNamestringName of lottery model type
userIdstringSet #{userId} to replace the currently logged in user ID.
countintNumber of draws
configConfig[]Stamp sheet placeholder applied settings values
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Lottery:DrawByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "lotteryName": "[string]Name of lottery model type",
        "userId": "[string]User Id",
        "count": "[int]Number of draws",
        "config": [
            {
                "key": "[string]Name",
                "value": "[string]Value"
            }
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Lottery:DrawByUserId
request:
  namespaceName: "[string]Namespace name"
  lotteryName: "[string]Name of lottery model type"
  userId: "[string]User Id"
  count: "[int]Number of draws"
  config: 
    - key: "[string]Name"
      value: "[string]Value"
  timeOffsetToken: "[string]Time offset token"
transaction.service("lottery").acquire.draw_by_user_id({
    namespaceName="[string]Namespace name",
    lotteryName="[string]Name of lottery model type",
    userId="[string]User Id",
    count="[int]Number of draws",
    config={
        {
            key="[string]Name",
            value="[string]Value"
        }
    },
    timeOffsetToken="[string]Time offset token",
})

Gs2Lottery:ResetBoxByUserId

Reset box with specified user ID

Actions for which quantity can be specified: NO

Reversible action: NO

TypeDescription
namespaceNamestringNamespace name
prizeTableNamestringName of prize table
userIdstringSet #{userId} to replace the currently logged in user ID.
timeOffsetTokenstringTime offset token
{
    "action": "Gs2Lottery:ResetBoxByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "prizeTableName": "[string]Name of prize table",
        "userId": "[string]User Id",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Lottery:ResetBoxByUserId
request:
  namespaceName: "[string]Namespace name"
  prizeTableName: "[string]Name of prize table"
  userId: "[string]User Id"
  timeOffsetToken: "[string]Time offset token"
transaction.service("lottery").acquire.reset_box_by_user_id({
    namespaceName="[string]Namespace name",
    prizeTableName="[string]Name of prize table",
    userId="[string]User Id",
    timeOffsetToken="[string]Time offset token",
})