ðAPIååŸã®ããŒã¿æ§é
æ®æ®µèŠæ £ããæ¥å ±ã®åœ¢ã§ã¯ãªãJSON圢åŒã§ååŸãããŸãã JSON圢åŒã¯ { key: value }ã®åœ¢ã§è¡šçŸãããããŒã¿æ§é ã§ãã
æ¥å ±ã®JSONæ§é
| ã㌠| å | 説æ |
|---|---|---|
| id | String | 20æåã§æ§æãããã©ã³ãã ãªæååã§ãããŠããŒã¯ã§ã(å³å¯ã«ã¯ç°ãªããèæ ®ã®å¿ èŠã¯ãªã) |
| no | NumberãŸãã¯Null | æ¥å ±ã«æ¡çªãããçªå·ã§ããé£çªã¯æ¥å ±äœæåŸã«éåæã§æ¯ãããããã¿ã€ãã³ã°ã«ãã£ãŠã¯Null |
| body | Object | æ¥å ±ææžæ¬äœ |
| createTs | Number | 13æ¡ã®æ°å€ïŒããªç§å«ãUnixã¿ã€ã ã¹ã¿ã³ãïŒãæ¥å ±ããµãŒãã«ååä¿åãããæå» |
| updateTs | Number | 13æ¡ã®æ°å€ïŒããªç§å«ãUnixã¿ã€ã ã¹ã¿ã³ãïŒãæ¥å ±ãæåŸã«æŽæ°ãããæå» |
| userTs | Number | 13æ¡ã®æ°å€ïŒããªç§å«ãUnixã¿ã€ã ã¹ã¿ã³ãïŒãæ¥å ±äœæè ãæå®ãã衚瀺äžã®æ¥æ |
| distId | String | ä»çŸåšãã®æ¥å ±ãæ¿èªã»æ£åŽåºæ¥ãæš©éã®ã¹ã¿ããID |
| dists | Stringé å | æ¥å ±ã®æåºå ã¹ã¿ããIDã®é åã§ããé åã®åºåé ã«æ¿èªãè¡ããŸããæ¿èªãæ£åŽãã§ããã®ã¯äžèšã®distIdã«äžèŽããã¹ã¿ããã®ã¿ |
| observer | Stringé å | ãã®æ¥å ±ãèªãããšãã§ããã¹ã¿ããã®IDé¡ã§ããæ¿èªãæ£åŽã®æš©éã¯ãããŸããã |
| readed | Stringé å | ãã®æ¥å ±ãèªãã ãã©ã°ãç«ãŠãã¹ã¿ããIDã®é åã§ããæ¿èªãæ£åŽãããã¹ã¿ãããreadedã«å«ãŸããŸã |
| tags | Stringé å | æ¥å ±ã«ä»ããããã¿ã°ã®IDé å |
| sign | ã³ã¬ã¯ã·ã§ã³ | æ¿èªãæ£åŽæ¥æãèšé²ããã³ã¬ã¯ã·ã§ã³ã§ããã³ãŒãã§æžããš sign:{ uid: string, ts: number, agree: boolean}[]ã§ããæ¿èªããæ¥æãæ¿èªè IDã確èªå¯èœ |
| state | String | æ¿èªã»æ£åŽã»ä¿®æ£ã»æ°èŠã»é²è¡ããã¥ããã®æå |
| owner | String | æ¥å ±ãäœæããã¹ã¿ããã®IDãå ±çšã䜿ããšãã«äœæè IDãšããŠã»ããããããå ±çšã䜿ããªãå Žåã¯åŸè¿°ãããaccountããšåžžã«åãå€ãå ¥ã |
| account | String | æ¥å ±ãäœæããFirebaseäžã®ãŠãŒã¶ID |
| templateId | String | ãã®æ¥å ±ãäœæããããã«äœ¿çšããããã³ãã¬ãŒãã®ID |
| taskId | String | æ¥å ±ãšäºå®ãçŽä»ãããããšããäºå®ã®IDãã»ããããã |
以äžã¯å®éã«APIã䜿ã£ãŠããŒãããæ¥å ±ã®ããŒã¿ã®ãµã³ãã«ã§ãã
{
"readed": ["mMSejOQa21d9OtXo1BtjFzrEt6J3"],
"id": "V9MGSesp0LUgXUPo0Skv",
"taskId": "none",
"no": 3,
"tags": [],
"owner": "mMSejOQa21d9OtXo1BtjFzrEt6J3",
"updateTs": 1659400505426,
"account": "mMSejOQa21d9OtXo1BtjFzrEt6J3",
"templateId": "uDE74jrGtn90vZZqsaci",
"distId": "mMSejOQa21d9OtXo1BtjFzrEt6J3",
"userTs": 1659400505425,
"sign": [],
"createTs": 1659400505426,
"body": {
"B2x": "ãã",
"SAl": ["ãã¡ã","ãã¯ã","é€å","å¹²ç¢"],
"1ST": ["é€å","ãã©ã","çŒããã°","çä¹³","ãã¯ã"],
"N70": ["ãã¡ã","å¹²ç¢","ã¡ãã³"],
"iif": "ãã"
},
"observer": ["mMSejOQa21d9OtXo1BtjFzrEt6J3"],
"dists": ["mMSejOQa21d9OtXo1BtjFzrEt6J3"],
"state": "æ°èŠ"
};ã¿ã€ã ã«ãŒãã®JSONæ§é
| ã㌠| å | 説æ |
|---|---|---|
| id | StringïŒä»»æïŒ | 20æåã§æ§æãããã©ã³ãã ãªæååã§ãããŠããŒã¯ã§ã(å³å¯ã«ã¯ç°ãªããèæ ®ã®å¿ èŠã¯ãªã) |
| date | String | æ¥ä»ã衚ãæååã圢åŒã¯ “YYYY-MM-DD”ïŒäŸ: “2023-03-21”ïŒ |
| day | Number | æ¥ä»ã®Unixã¿ã€ã ã¹ã¿ã³ãïŒããªç§ïŒãJSTã®0æåºæº |
| start | String | åºå€æå»ã"08:00" ã®ãããªæåå |
| end | String | é倿å»ã"17:00" ã®ãããªæåå |
| breaks | Array | äŒæ©æéã®é
åãåèŠçŽ ã¯ { start: string, end: string } åœ¢åŒ |
| redacted | Boolean | ç·šéæžã¿ãã©ã°ããŠãŒã¶ãŒãç·šéããå Žå true |
| isHolydayWork | Boolean | äŒæ¥åºå€ãã©ã°ãäŒæ¥ã«å€åããå Žå true |
| memo | String | åèæ¬ã®æååãèªç±èšè¿° |
| generator | String | ãã®ã¿ã€ã ã«ãŒããäœæããã¹ã¿ããID |
| staffId | String | ãã®ã¿ã€ã ã«ãŒãã®å¯Ÿè±¡ã¹ã¿ããã®ID |
| createTs | Number | ååäœææ¥æãUnixã¿ã€ã ã¹ã¿ã³ãïŒããªç§ïŒ |
| updateTs | Number | æçµæŽæ°æ¥æãUnixã¿ã€ã ã¹ã¿ã³ãïŒããªç§ïŒ |
| calcData | Object | äžèšã®èšç®çµæããŒã¿ïŒæå»ãäŒæ©ãªã©ãå ã«ç®åºãããéèšå€ïŒ |
calcData ã®äžèº«
| ã㌠| å | 説æ |
|---|---|---|
| editStart | String | äžžãåŸã®åºå€æå»ïŒäŸ: "08:00"ïŒ |
| editEnd | String | äžžãåŸã®é倿å»ïŒäŸ: "17:00"ïŒ |
| dayWork | Number | æ¥å€åŽåæéïŒåïŒ |
| nightWork | Number | å€å€åŽåæéïŒåïŒ |
| totalWorkTime | Number | å®åŽåæéïŒåïŒãæ¥å€ïŒå€å€âäŒæ© |
| overWorkTime | Number | è¶ éåŽåæéïŒåïŒ |
| calcBreakTimeDay | Number | æ¥å€äžã®äŒæ©æéïŒåïŒ |
| calcBreakTimeNight | Number | å€å€äžã®äŒæ©æéïŒåïŒ |
| dayWorkHolyDay | Number | äŒæ¥ã®æ¥å€åŽåæéïŒåïŒ |
| nightWorkHolyDay | Number | äŒæ¥ã®å€å€åŽåæéïŒåïŒ |
ð åè
calcDataã¯ãµãŒãåŽã§å€åæ å ±ããèªåç®åºãããéèšå€ãbreaksã«è€æ°ã®äŒæ©æéãããå ŽåããcalcBreakTimeDayãcalcBreakTimeNightã«åæ ãããŸããisHolydayWorkã true ã®ãšããdayWorkHolyDayãnightWorkHolyDayã«å€ãå ¥ãå ŽåããããŸããmemoãredactedã¯ãŠãŒã¶ãŒæäœã«ãã倿ŽãããèŠçŽ ã§ãã
ã¿ã€ã ã«ãŒãã®APIã¬ã¹ãã³ã¹äŸ
{
"error": false,
"result": {
"data": [
{
"id": "vY8ovmFPaaz3z41GzKAy",
"date": "2023-03-21",
"breaks": [{ "start": "12:00", "end": "13:00" }],
"redacted": false,
"isHolydayWork": false,
"start": "08:00",
"generator": "mMSejOQa21d9OtXo1BtjFzrEt6J3",
"memo": "",
"createTs": 1679400813656,
"end": "17:00",
"day": 1679353200000,
"updateTs": 1679400813656,
"staffId": "mMSejOQa21d9OtXo1BtjFzrEt6J3",
"calcData": {
"calcBreakTimeDay": 60,
"calcBreakTimeNight": 0,
"dayWorkHolyDay": 0,
"nightWorkHolyDay": 0,
"dayWork": 480,
"nightWork": 0,
"totalWorkTime": 480,
"overWorkTime": 0,
"editStart": "08:00",
"editEnd": "17:00"
}
}
],
"count": 10,
"totalCalc": {
"totalWorkTime": 5040,
"overWorkTime": 240,
"dayWorkHolyDay": 0,
"nightWorkHolyDay": 0,
"dayWork": 5040,
"nightWork": 0,
"calcBreakTimeDay": 540,
"calcBreakTimeNight": 0
}
}
}ãã³ãã¬ãŒãã®JSONæ§é
| ã㌠| å | 説æ |
|---|---|---|
| ts | Number | ãã³ãã¬ãŒããäœæãããæ¥ïŒããªç§å«ãUnixã¿ã€ã ã¹ã¿ã³ãïŒ |
| prefix | String | ææžçªå·ã®åã«ä»ãããèšå·ãåæå€ã¯"No." |
| active | Boolean | ãã³ãã¬ãŒããæå¹ãªå Žåã¯Trueãç¡å¹ã«ãããšFalse |
| memo | String | ãã³ãã¬ãŒãèªäœã«ä»ãããã¡ã¢ãåæå€ã¯"ãã³ãã¬ãŒãã¡ã¢" |
| name | String | ãã³ãã¬ãŒãã®å€§èŠåºã |
| noruma | Number? | ïŒæ¥ãããã®æåºææ°ç®å®ãåæå€ã¯0 |
| id | String | ãã³ãã¬ãŒãã®ID |
| tags | String[] | ãã³ãã¬ãŒãã«ä»äžããã¿ã°ã®ID |
| body | Collection | ãã³ãã¬ãŒãã®æ¬äœãšãèšããé ç®ãè©³çŽ°ã¯æ¬¡ç« |
ãã³ãã¬ãŒãå ã®Bodyæ§é
Bodyã¯ãã³ãã¬ãŒãã®å ¥åãã©ãŒã ãæãããªããžã§ã¯ãã§CollectionïŒãªããžã§ã¯ãã®é åïŒã®æ§é ãããŠããŸã
| ã㌠| å | 説æ |
|---|---|---|
| labelSize | String | èŠåºãã®æåãµã€ãºãlabel_sã®ãããªå€ãå ¥ã |
| label | String | èŠåºãã®æåå |
| key | String | å ¥åã®ããŒã¿ãšãã³ãã¬ãŒããçŽä»ããããã®éµããã®å€ãæ¥å ±æ¬äœããŒã¿äžã®KeyãšããŠäœ¿çšããã |
| labelColor | èŠåºãã®è² | |
| req | Boolean | å ¥åå¿ é ãªãTrue |
| type | String | æåå ¥åãæ°å€å ¥åãªã©ãããŒã¿ã®æ§é ã«å¿ããå€ãå ¥ã |
| w | Number | ãã³ãã¬ãŒãã§å°æããå¹ 1ã12 |
| any | any | ãã®ä»ãå ¥åãã©ãŒã ã«å¿ããŠå¿ èŠãªãã©ã¡ãŒã¿ã远å ãããŸã… |
ãã³ãã¬ãŒããšæ¥å ±æ¬æã®å¯Ÿå¿
äŸãã°æ¬¡ã®ãããªãã³ãã¬ãŒãããã£ããšããŸãã説æã®ããBodyã®ã¿ã§ããã€å 容ãå€§å¹ ã«ç°¡ç¥åããŠããŸãã
"body": [
{
"label": "仿¥ã®å€é£",
"key": "N70",
"type": "text",
"w": 4
},
{
"label": "æ
åœè·å¡å",
"key": "1ST",
"type": "text",
"w": 4
},
{
"label": "ã¹ã³ã¢",
"key": "A4x",
"type": "number",
"w": 4
}
]ãã®ãã³ãã¬ãŒãã䜿ã£ãŠäœæãããæ¥å ±ã®Bodyã¯æ¬¡ã®ããã«ãªããŸã
"body": {
"N70": "ãããã©ã",
"1ST": "é·è°·å·ç ç©¶å¡",
"A4x": 100
}ãã³ãã¬ãŒãäžã® keyããæ¥å ±æ¬æã®ããŒãšããŠäœ¿ãããŠããŸãã