Add WeCom card client for retrieving check-in records

This commit is contained in:
2026-01-16 10:48:14 +08:00
parent 1496af0973
commit 1f5140c0fe
4 changed files with 78 additions and 1 deletions

View File

@@ -0,0 +1,44 @@
import datetime
from service.wecom.schemas.base import BaseSchema
class CheckinType:
"""打卡类型"""
ON_OFF_DUTY = 1 # 上下班打卡
OUTING = 2 # 外出打卡
ALL = 3 # 全部打卡
class GetCardRecordsRequest(BaseSchema):
"""获取打卡记录请求"""
opencheckindatatype: CheckinType
starttime: datetime.datetime
endtime: datetime.datetime
useridlist: list[str]
class GetCardRecord(BaseSchema):
userid: str
groupname: str
checkin_type: str
exception_type: str
checkin_time: datetime.datetime
location_title: str
location_detail: str
wifiname: str
notes: str
wifimac: str
mediaids: list[str]
sch_checkin_time: datetime.datetime
groupid: int
schedule_id: int
timeline_id: int
class GetCardRecordsResponse(BaseSchema):
errcode: int
errmsg: str
checkindata: list[GetCardRecord]