diff --git a/backend/app/routers/collections.py b/backend/app/routers/collections.py index 983ba1c..04f0481 100644 --- a/backend/app/routers/collections.py +++ b/backend/app/routers/collections.py @@ -101,6 +101,7 @@ def get_next_code( def get_collections( category: Optional[str] = None, status: Optional[str] = None, + user_id: Optional[str] = None, search: Optional[str] = None, page: int = Query(1, ge=1), limit: int = Query(20, ge=1, le=100), @@ -121,6 +122,8 @@ def get_collections( if category: query = query.filter(Collection.f01_03_category == category) + if user_id: + query = query.filter(Collection.f99_91_user_id == user_id) if status: query = query.filter(Collection.f01_04_status == status) if search: @@ -322,10 +325,20 @@ def get_collections_by_user( for c in collections: result.append({ "f99_90_id": c.f99_90_id, + "name": c.f01_01_name, + "code": c.f01_02_code, + "prefixSerial": c.f02_10_prefix_serial, + "version": c.f02_11_version, + "category": c.f01_03_category, + "status": c.f01_04_status, + "packaging": c.f02_12_packaging, + "isGraded": c.f03_20_is_graded, + "costPrice": c.f05_40_cost_price, "f01_01_name": c.f01_01_name, "f02_10_prefix_serial": c.f02_10_prefix_serial, "f02_11_version": c.f02_11_version, "f01_04_status": c.f01_04_status, + "userId": c.f99_91_user_id, "f05_40_cost_price": c.f05_40_cost_price, "f99_92_created_at": c.f99_92_created_at.isoformat() if c.f99_92_created_at else None }) diff --git a/config/VERSION b/config/VERSION index 52cda95..79127d8 100644 --- a/config/VERSION +++ b/config/VERSION @@ -1 +1 @@ -v1.1.22 +v1.2.0