MCPcopy Index your code
hub / github.com/fastapi/sqlmodel / Hero

Class Hero

docs_src/tutorial/code_structure/tutorial002_py310/hero_model.py:9–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8
9class Hero(SQLModel, table=True):
10 id: int | None = Field(default=None, primary_key=True)
11 name: str = Field(index=True)
12 secret_name: str
13 age: int | None = Field(default=None, index=True)
14
15 team_id: int | None = Field(default=None, foreign_key="team.id")
16 team: Optional["Team"] = Relationship(back_populates="heroes")

Callers 1

create_heroesFunction · 0.70

Calls 2

FieldFunction · 0.90
RelationshipFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…