Coverage for docs_src/sql_databases/sql_app/schemas.py: 100%
22 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 typing import List, Union 1abcde
3from pydantic import BaseModel 1abcde
6class ItemBase(BaseModel): 1abcde
7 title: str 1abcde
8 description: Union[str, None] = None 1abcde
11class ItemCreate(ItemBase): 1abcde
12 pass 1abcde
15class Item(ItemBase): 1abcde
16 id: int 1abcde
17 owner_id: int 1abcde
19 class Config: 1abcde
20 orm_mode = True 1abcde
23class UserBase(BaseModel): 1abcde
24 email: str 1abcde
27class UserCreate(UserBase): 1abcde
28 password: str 1abcde
31class User(UserBase): 1abcde
32 id: int 1abcde
33 is_active: bool 1abcde
34 items: List[Item] = [] 1abcde
36 class Config: 1abcde
37 orm_mode = True 1abcde