This commit is contained in:
Waylon Walker 2023-05-19 14:11:01 -05:00
parent 4be274d9e2
commit c238b9d757
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
21 changed files with 219 additions and 184 deletions

View file

@ -0,0 +1,16 @@
from typing import Optional
from sqlmodel import Field
from learn_sql_model.models.fast_model import FastModel
class Pet(FastModel, table=True):
id: Optional[int] = Field(default=None, primary_key=True)
name: str = "Jim"
# age: Optional[int] = None
# hero_id: int = Field(default=None, foreign_key="hero.id")
# hero: Optional[Hero] = Relationship(back_populates="pets")