sub office
This commit is contained in:
+2
-35
@@ -123,45 +123,12 @@ class Members(db.Model):
|
||||
|
||||
query = cls.query
|
||||
logger.info(f"Get all customer back")
|
||||
# Apply filters if provided
|
||||
# if id:
|
||||
# query = query.filter(cls.id == id)
|
||||
|
||||
if username:
|
||||
query = query.filter(cls.customer_id == username)
|
||||
query = query.filter(cls.username == username)
|
||||
|
||||
if email:
|
||||
query = query.filter(cls.account_id == email)
|
||||
|
||||
# if status:
|
||||
# query = query.filter(cls.status == status)
|
||||
#
|
||||
# if tenor:
|
||||
# query = query.filter(cls.tenor == tenor)
|
||||
#
|
||||
# if offer_id:
|
||||
# query = query.filter(cls.offer_id == offer_id)
|
||||
#
|
||||
# if product_id:
|
||||
# query = query.filter(cls.product_id == product_id)
|
||||
#
|
||||
# if transaction_id:
|
||||
# query = query.filter(cls.transaction_id == transaction_id)
|
||||
#
|
||||
# if original_transaction:
|
||||
# query = query.filter(cls.original_transaction == original_transaction)
|
||||
#
|
||||
# if start_date:
|
||||
# query = query.filter(cls.created_at >= start_date)
|
||||
#
|
||||
# if end_date:
|
||||
# query = query.filter(cls.created_at <= end_date)
|
||||
#
|
||||
# if due_before:
|
||||
# query = query.filter(cls.due_date <= due_before)
|
||||
#
|
||||
# if due_after:
|
||||
# query = query.filter(cls.due_date >= due_after)
|
||||
query = query.filter(cls.email == email)
|
||||
|
||||
# Order by created_at descending (newest first)
|
||||
query = query.order_by(cls.added.desc())
|
||||
|
||||
Reference in New Issue
Block a user