| 22 | |
| 23 | |
| 24 | class Article(Base): |
| 25 | __tablename__ = "articles" |
| 26 | |
| 27 | id: Mapped[int] = mapped_column(primary_key=True) |
| 28 | |
| 29 | tags: Mapped[Dict[str, str]] = mapped_column(JSON) |
| 30 | topic: hybrid_property[str] = index_property("tags", "topic") |
| 31 | |
| 32 | updates: Mapped[List[date]] = mapped_column(ARRAY[date]) |
| 33 | created_at = index_property( |
| 34 | "updates", 0, mutable=True, default=date.today() |
| 35 | ) |
| 36 | updated_at: hybrid_property[date] = index_property("updates", -1) |
| 37 | |
| 38 | |
| 39 | a = Article( |
no test coverage detected