feat site reset

This commit is contained in:
jxxghp
2023-07-16 10:13:40 +08:00
parent df98bd1bd0
commit 5cfd063817
3 changed files with 19 additions and 0 deletions

View File

@ -57,3 +57,8 @@ class Site(Base):
@staticmethod
def list_order_by_pri(db: Session):
return db.query(Site).order_by(Site.pri).all()
@staticmethod
def reset(db: Session):
db.query(Site).delete()
db.commit()