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:
2026-01-16 11:34:31 +08:00
parent 4e08b9a986
commit 39b6180fb8
3 changed files with 117 additions and 18 deletions

View File

@@ -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值小的排序靠前。