Coverage for docs_src/sql_databases/sql_app_py310/schemas.py: 100%
21 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-08-08 03:53 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-08-08 03:53 +0000
1from pydantic import BaseModel 1abc
4class ItemBase(BaseModel): 1abc
5 title: str 1abc
6 description: str | None = None 1abc
9class ItemCreate(ItemBase): 1abc
10 pass 1abc
13class Item(ItemBase): 1abc
14 id: int 1abc
15 owner_id: int 1abc
17 class Config: 1abc
18 orm_mode = True 1abc
21class UserBase(BaseModel): 1abc
22 email: str 1abc
25class UserCreate(UserBase): 1abc
26 password: str 1abc
29class User(UserBase): 1abc
30 id: int 1abc
31 is_active: bool 1abc
32 items: list[Item] = [] 1abc
34 class Config: 1abc
35 orm_mode = True 1abc