This commit is contained in:
Waylon Walker 2023-05-19 20:37:42 -05:00
parent c238b9d757
commit fcc0698aeb
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
12 changed files with 95 additions and 97 deletions

15
learn_sql_model/models.py Normal file
View file

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