Coverage for app/core/base/base_request.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.6.10, created at 2025-01-15 01:44 +0000

1 

2from abc import ABCMeta 

3 

4from pydantic.alias_generators import to_camel 

5from sqlmodel import SQLModel 

6from sqlmodel._compat import SQLModelConfig 

7 

8 

9class BaseRequest(SQLModel, metaclass=ABCMeta): 

10 """ 

11 リクエストスキーマのベース. 

12 

13 camelCaseの入力をsnake_caseに変換する 

14 """ 

15 

16 model_config = SQLModelConfig( 

17 populate_by_name=True, 

18 alias_generator=to_camel, 

19 )