Skip to content

Commit

Permalink
start docs on tables and columns (country)
Browse files Browse the repository at this point in the history
  • Loading branch information
daroczig committed Jan 13, 2024
1 parent 3b21d4e commit 68e1565
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sc_crawler/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ class Status(str, Enum):


class Country(SQLModel, table=True):
id: str = Field(default=None, primary_key=True)
continent: str
__table_args__ = {"comment": "Country and continent mapping."}
id: str = Field(
default=None,
primary_key=True,
sa_column_kwargs={"comment": "Country code by ISO 3166 alpha-2."},
)
continent: str = Field(sa_column_kwargs={"comment": "Continent name."})

vendors: List["Vendor"] = Relationship(back_populates="country")
datacenters: List["Datacenter"] = Relationship(back_populates="country")
Expand Down

0 comments on commit 68e1565

Please sign in to comment.