- Replace manual initialization sequence with ChainBuilder pattern - Add ChainBuilder class supporting both sync and async task chaining - Rename test_init() to data_base_init() for clarity - Fix string formatting in log messages (remove f-string where unnecessary) - Fix escape sequence in department schema documentation - Convert CheckinType to Enum for better type safety
46 lines
932 B
Python
46 lines
932 B
Python
import datetime
|
|
|
|
from enum import Enum
|
|
from service.wecom.schemas.base import BaseSchema
|
|
|
|
|
|
class CheckinType(Enum):
|
|
"""打卡类型"""
|
|
|
|
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]
|