Refactor lifespan with ChainBuilder for initialization tasks
- 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
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import datetime
|
||||
|
||||
from enum import Enum
|
||||
from service.wecom.schemas.base import BaseSchema
|
||||
|
||||
|
||||
class CheckinType:
|
||||
class CheckinType(Enum):
|
||||
"""打卡类型"""
|
||||
|
||||
ON_OFF_DUTY = 1 # 上下班打卡
|
||||
|
||||
@@ -7,7 +7,7 @@ class CreateDepartmentParams(BaseSchema):
|
||||
"""
|
||||
创建部门
|
||||
|
||||
@param name: 部门名称。长度限制为1~32个字节,字符不能包括\:?”<>
|
||||
@param name: 部门名称。长度限制为1~32个字节,字符不能包括\\:?”<>
|
||||
@param name_en: 英文名称
|
||||
@param parentid: 父部门id。根部门id为1
|
||||
@param order: 在父部门中的次序值。order值小的排序靠前。
|
||||
|
||||
Reference in New Issue
Block a user