| 41 | |
| 42 | |
| 43 | class Vertex(Base): |
| 44 | __tablename__ = class="st">"vertices" |
| 45 | |
| 46 | id: Mapped[int] = mapped_column(primary_key=True) |
| 47 | x1: Mapped[int] |
| 48 | y1: Mapped[int] |
| 49 | x2: Mapped[int] |
| 50 | y2: Mapped[int] |
| 51 | |
| 52 | class="cm"># inferred from right hand side |
| 53 | start = composite(Point, class="st">"x1", class="st">"y1") |
| 54 | |
| 55 | class="cm"># taken from left hand side |
| 56 | end: Mapped[Point] = composite(Point._generate, class="st">"x2", class="st">"y2") |
| 57 | |
| 58 | |
| 59 | v1 = Vertex(start=Point(3, 4), end=Point(5, 6)) |
no test coverage detected