Coverage for packages/clopos/src/integrify/clopos/schemas/price_lists/object.py: 100%
31 statements
« prev ^ index » next coverage.py v7.16.0, created at 2026-10-19 02:39 +0000
« prev ^ index » next coverage.py v7.16.0, created at 2026-10-19 02:39 +0000
1from decimal import Decimal
3from integrify.utils import UnsetOrNoneField
4from pydantic import BaseModel
7class PriceListPrice(BaseModel):
8 id: int
9 """Unique identifier of the price entry"""
11 list_id: int
12 """ID of the price list this price belongs to"""
14 product_id: int
15 """ID of the product this price applies to"""
17 price: Decimal
18 """The price value for the product in this list"""
20 product: UnsetOrNoneField[dict]
21 """The related product object (included with `with[]=product`)"""
23 list: UnsetOrNoneField[dict]
24 """The related price list object (included with `with[]=list`)"""
27class PriceList(BaseModel):
28 id: int
29 """Unique identifier of the price list"""
31 name: str
32 """Name of the price list"""
34 description: UnsetOrNoneField[str]
35 """Description of the price list"""
37 status: bool
38 """Whether the price list is active"""
40 prices: UnsetOrNoneField[list[PriceListPrice]]
41 """Prices contained in this list (included with `with[]=prices`)"""
43 created_at: UnsetOrNoneField[str]
44 """The timestamp when the price list was created"""
46 updated_at: UnsetOrNoneField[str]
47 """The timestamp when the price list was last updated"""