Skip to content

Instantly share code, notes, and snippets.

@denny0223
Last active March 5, 2017 09:29
Show Gist options
  • Save denny0223/ab0ccf9729482d6a86724a16289ebf75 to your computer and use it in GitHub Desktop.
Save denny0223/ab0ccf9729482d6a86724a16289ebf75 to your computer and use it in GitHub Desktop.
SITCON Staff Checking Scenario
{
"checkin": {
"order": 0,
"available_time": "2017/03/18 07:30 +0800",
"expire_time": "2017/03/18 17:00 +0800",
"countdown": 0,
"related_scenario": [
{
"id": "kit",
"unlock": true
},
{
"id": "radios",
"unlock": true
}
]
},
"order_goods": {
"order": 1,
"available_time": "2017/03/18 07:30 +0800",
"expire_time": "2017/03/18 17:00 +0800",
"countdown": 60,
"lock_message": "Haven't Check-in",
"attr": [
{
"row_name": "order_shirt",
"attr_name": "order_shirt"
},
{
"row_name": "order_pillow",
"attr_name": "order_pillow"
}
]
},
"shirt_size": {
"order": 2,
"available_time": "2017/03/18 07:30 +0800",
"expire_time": "2017/03/18 17:00 +0800",
"countdown": 30,
"lock_message": "Haven't Check-in"
},
"radios": {
"order": 3,
"available_time": "2017/03/18 07:30 +0800",
"expire_time": "2017/03/18 17:00 +0800",
"countdown": 30,
"lock_message": "Haven't Check-in"
}
}
@denny0223
Copy link
Author

related_scenario 裡面的 staff_query_used 拿掉

不能因為是工作人員幫他報到導致後面的 attribute 就看不到

radios 也不像便當一樣有太晚報到不給領取的狀態,所以和 kit 相同即可

attr 撰寫的方式是我寫那樣,raw_name 是指在 csv 的欄位名稱,attr_name 是指在程式內使用的欄位名稱

如果沒有 value 這個 field 就會會直接把欄位內的值複製過去使用

若有,就是 map 參考 如 repo 內的範例

https://github.com/CCIP-App/CCIP-Server/blob/master/app/scenario-sample.json#L45-L48

@lili668668
Copy link

應該沒有 map 的項目 OwO
shirt_size 就是尺碼
order_pillow 是抱枕的數量

@lili668668
Copy link

{
"checkin": {
"order": 0,
"available_time": "2017/03/18 07:30 +0800",
"expire_time": "2017/03/18 17:00 +0800",
"countdown": 0,
"related_scenario": [
{
"id": "kit",
"unlock": true
},
{
"id": "radios",
"unlock": true
}
]
},
"order_goods": {
"order": 1,
"available_time": "2017/03/18 07:30 +0800",
"expire_time": "2017/03/18 17:00 +0800",
"countdown": 60,
"lock_message": "Haven't Check-in",
"attr": [
{
"row_name": "order_shirt",
"attr_name": "order_shirt"
},
{
"row_name": "order_pillow",
"attr_name": "order_pillow"
}
]
},
"shirt_size":{
"order": 2,
"available_time": "2017/03/18 07:30 +0800",
"expire_time": "2017/03/18 17:00 +0800",
"countdown": 30,
"lock_message": "Haven't Check-in"
},
"radios": {
"order": 3,
"available_time": "2017/03/18 07:30 +0800",
"expire_time": "2017/03/18 17:00 +0800",
"countdown": 30,
"lock_message": "Haven't Check-in"
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment