This commit is contained in:
Waylon Walker 2023-06-06 09:57:21 -05:00
parent 6b1c60a550
commit 839cbd0dc0
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
17 changed files with 213 additions and 35 deletions

View file

@ -1,3 +1,4 @@
from datetime import datetime
from typing import Optional, TYPE_CHECKING
from sqlmodel import Field, Relationship
@ -11,4 +12,5 @@ if TYPE_CHECKING:
class Pet(FastModel, table=True):
id: Optional[int] = Field(default=None, primary_key=True)
name: str = "Jim"
birthday: Optional[datetime] = None
hero: "Hero" = Relationship(back_populates="pet")