Skip to content

Commit ed638a0

Browse files
committed
обновлена логика брутто и добавлен package_count
1 parent b5c3438 commit ed638a0

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/openinflation_dataclass/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Pydantic models for products, categories, and retail geolocation."""
22

3-
__version__ = "0.1.4"
3+
__version__ = "0.1.5"
44

55
from .card import Card, MetaData, WholesalePrice
66
from .geolocation import AdministrativeUnit, RetailUnit, Schedule

src/openinflation_dataclass/card.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,15 @@ class Card(NetworkModel):
6666
# unit="KGM", available_count=12.7, package_quantity=None, package_unit=None
6767
# Water vending:
6868
# unit="LTR", available_count=29.2, package_quantity=0.5, package_unit="LTR"
69-
unit: Literal["PCE", "KGM", "LTR"] | None = None
69+
unit_net: Literal["PCE", "KGM", "LTR"] | None = None
7070
available_count: int | float | None = None
7171
package_quantity_net: float | None = None
72-
"""Кол-во в нетто"""
73-
package_quantity_gross: float | None = None
74-
"""Кол-во в брутто"""
72+
"""Кол-во в нетто (зависит от unit)"""
73+
package_weight_gross: float | None = None
74+
"""Вес в брутто (т.к. брутто измеряется в логистике только в нем)"""
7575
package_unit: Literal["KGM", "LTR"] | None = None
76+
package_count: float | None = None
77+
"""Кол-во единиц товара в упаковке"""
7678

7779
# All in meters
7880
dimension_height: float | None = None

0 commit comments

Comments
 (0)