This commit is contained in:
jxxghp
2023-06-11 09:01:25 +08:00
parent cf301f11ad
commit 4061fd21c8
8 changed files with 49 additions and 16 deletions

View File

@ -31,3 +31,7 @@ class Site(Base):
@staticmethod
def get_by_domain(db: Session, domain: str):
return db.query(Site).filter(Site.domain == domain).first()
@staticmethod
def get_actives(db: Session):
return db.query(Site).filter(Site.is_active is True).all()