| 44 | |
| 45 | |
| 46 | class User(Base): |
| 47 | __tablename__ = "user" |
| 48 | |
| 49 | id: Mapped[int] = mapped_column(primary_key=True) |
| 50 | name: Mapped[str] = mapped_column() |
| 51 | group_id = mapped_column(ForeignKey("group.id")) |
| 52 | |
| 53 | # this currently doesn't generate an error. not sure how to get the |
| 54 | # overloads to hit this one, nor am i sure i really want to do that |
| 55 | # anyway |
| 56 | name_this_works_atm: Mapped[str] = mapped_column(nullable=True) |
| 57 | |
| 58 | extra: Mapped[Optional[str]] = mapped_column() |
| 59 | extra_name: Mapped[Optional[str]] = mapped_column("extra_name") |
| 60 | |
| 61 | addresses_style_one: Mapped[List["Address"]] = relationship() |
| 62 | addresses_style_two: Mapped[Set["Address"]] = relationship() |
| 63 | |
| 64 | |
| 65 | class Address(Base): |
nothing calls this directly
no test coverage detected