This commit is contained in:
jxxghp
2023-07-07 09:54:12 +08:00
parent ecec348886
commit 1b42a382a1
2 changed files with 10 additions and 9 deletions

View File

@ -18,7 +18,7 @@ class Site(Base):
# 站点地址
url = Column(String, nullable=False)
# 站点优先级
pri = Column(Integer)
pri = Column(Integer, default=1)
# RSS地址未启用
rss = Column(String)
# Cookie
@ -53,3 +53,7 @@ class Site(Base):
@staticmethod
def get_actives(db: Session):
return db.query(Site).filter(Site.is_active == 1).all()
@staticmethod
def list_order_by_pri(db: Session):
return db.query(Site).order_by(Site.pri).all()