add 站点、订阅API

This commit is contained in:
jxxghp
2023-06-12 09:27:39 +08:00
parent 6e8b687545
commit e10776cf1d
5 changed files with 69 additions and 47 deletions

View File

@ -37,3 +37,7 @@ class Subscribe(Base):
@staticmethod
def get_by_state(db: Session, state: str):
return db.query(Subscribe).filter(Subscribe.state == state).all()
@staticmethod
def get_by_tmdbid(db: Session, tmdbid: str):
return db.query(Subscribe).filter(Subscribe.tmdbid == tmdbid).first()