MCPcopy Index your code
hub / github.com/ndleah/python-mini-project / Subscription

Class Subscription

RSS_Manager/utils.py:17–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15
16
17class Subscription(Base):
18 __tablename__ = "feeds"
19
20 id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True)
21 url: Mapped[str] = mapped_column(nullable=False, unique=True, index=True)
22 title: Mapped[str] = mapped_column(nullable=False)
23 tag: Mapped[Optional[str]]
24 link: Mapped[str] = mapped_column(nullable=False)
25 updated_at: Mapped[datetime] = mapped_column(nullable=False, default=datetime.now)
26
27 def __repr__(self) -> str:
28 return f"Feed(id={self.id!r}, url={self.url!r},title={self.title},tag={self.tag!r},link={self.link!r})"
29
30
31Base.metadata.create_all(bind=engine)

Callers 1

add_feed_to_dbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected