Chance.query.filter(Chance.repo_id == repo_id, Chance.status == '1', db.
    func.date(Chance.apply_time) <= end, db.func.date(Chance.apply_time) >=
    start).count()
SQLAlchemy: how to filter date field?