Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for HeroCreate (0.1 sec)

  1. docs_src/sql_databases/tutorial002_an_py39.py

    
    class Hero(HeroBase, table=True):
        id: Union[int, None] = Field(default=None, primary_key=True)
        secret_name: str
    
    
    class HeroPublic(HeroBase):
        id: int
    
    
    class HeroCreate(HeroBase):
        secret_name: str
    
    
    class HeroUpdate(HeroBase):
        name: Union[str, None] = None
        age: Union[int, None] = None
        secret_name: Union[str, None] = None
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  2. docs_src/sql_databases/tutorial002_py310.py

    
    class Hero(HeroBase, table=True):
        id: int | None = Field(default=None, primary_key=True)
        secret_name: str
    
    
    class HeroPublic(HeroBase):
        id: int
    
    
    class HeroCreate(HeroBase):
        secret_name: str
    
    
    class HeroUpdate(HeroBase):
        name: str | None = None
        age: int | None = None
        secret_name: str | None = None
    
    
    sqlite_file_name = "database.db"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  3. docs_src/sql_databases/tutorial002_an.py

    
    class Hero(HeroBase, table=True):
        id: Union[int, None] = Field(default=None, primary_key=True)
        secret_name: str
    
    
    class HeroPublic(HeroBase):
        id: int
    
    
    class HeroCreate(HeroBase):
        secret_name: str
    
    
    class HeroUpdate(HeroBase):
        name: Union[str, None] = None
        age: Union[int, None] = None
        secret_name: Union[str, None] = None
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  4. docs_src/sql_databases/tutorial002_py39.py

    
    class Hero(HeroBase, table=True):
        id: Union[int, None] = Field(default=None, primary_key=True)
        secret_name: str
    
    
    class HeroPublic(HeroBase):
        id: int
    
    
    class HeroCreate(HeroBase):
        secret_name: str
    
    
    class HeroUpdate(HeroBase):
        name: Union[str, None] = None
        age: Union[int, None] = None
        secret_name: Union[str, None] = None
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  5. docs/pt/docs/tutorial/sql-databases.md

    * `id`
    * `name`
    * `age`
    * `secret_name`
    
    {* ../../docs_src/sql_databases/tutorial002_an_py310.py ln[7:18] hl[17:18] *}
    
    #### `HeroCreate` - o *modelo de dados* para criar um hero
    
    Agora criamos um modelo `HeroCreate`, este é o que **validará** os dados dos clientes.
    
    Ele tem os mesmos campos que `HeroBase`, e também tem `secret_name`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 15:25:29 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  6. docs_src/sql_databases/tutorial002.py

    
    class Hero(HeroBase, table=True):
        id: Union[int, None] = Field(default=None, primary_key=True)
        secret_name: str
    
    
    class HeroPublic(HeroBase):
        id: int
    
    
    class HeroCreate(HeroBase):
        secret_name: str
    
    
    class HeroUpdate(HeroBase):
        name: Union[str, None] = None
        age: Union[int, None] = None
        secret_name: Union[str, None] = None
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  7. docs_src/sql_databases/tutorial002_an_py310.py

    
    class Hero(HeroBase, table=True):
        id: int | None = Field(default=None, primary_key=True)
        secret_name: str
    
    
    class HeroPublic(HeroBase):
        id: int
    
    
    class HeroCreate(HeroBase):
        secret_name: str
    
    
    class HeroUpdate(HeroBase):
        name: str | None = None
        age: int | None = None
        secret_name: str | None = None
    
    
    sqlite_file_name = "database.db"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_sql_databases/test_tutorial002.py

                                "content": {
                                    "application/json": {
                                        "schema": {
                                            "$ref": "#/components/schemas/HeroCreate"
                                        }
                                    }
                                },
                            },
                            "responses": {
                                "200": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 19.9K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/sql-databases.md

    * `id`
    * `name`
    * `age`
    * `secret_name`
    
    {* ../../docs_src/sql_databases/tutorial002_an_py310.py ln[7:18] hl[17:18] *}
    
    #### `HeroCreate` - the *data model* to create a hero
    
    Now we create a `HeroCreate` model, this is the one that will **validate** the data from the clients.
    
    It has the same fields as `HeroBase`, and it also has `secret_name`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 14.7K bytes
    - Viewed (0)
Back to top