'''
Author: your name
Date: 2021-07-22 04:03:24
LastEditTime: 2021-07-22 04:03:24
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath: \evm-store\tools\build_out\controllers\workbench.py
'''
from datetime import datetime, timedelta


time_now = datetime.now()
#最近30天数据
model_user = User.query.filter(User.create_time >= time_now - timedelta(days=30)).all()
#最近一周数据
model_user = User.query.filter(User.create_time >= time_now - timedelta(days=7)).all()
#最近1天数据
model_user = User.query.filter(User.create_time >= time_now - timedelta(days=1)).all()
#最近12小时
model_user = User.query.filter(User.create_time >= time_now - timedelta(hours=12)).all()
#最近半小时
model_user = User.query.filter(User.create_time >= time_now - timedelta(seconds=30)).all()
