Skip to content

Commit 72760af

Browse files
committed
Add missing Product and ProductStats models
1 parent 85814b8 commit 72760af

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

licensechain/models.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,29 @@ class UserStats(BaseLicenseChainModel):
183183
inactive: int = 0
184184

185185

186+
class Product(BaseLicenseChainModel):
187+
"""Product model."""
188+
189+
id: Optional[str] = None
190+
name: str
191+
description: Optional[str] = None
192+
price: float = 0.0
193+
currency: str = "USD"
194+
active: bool = True
195+
created_at: Optional[datetime] = None
196+
updated_at: Optional[datetime] = None
197+
licenses_count: int = 0
198+
199+
200+
class ProductStats(BaseLicenseChainModel):
201+
"""Product statistics model."""
202+
203+
total: int = 0
204+
active: int = 0
205+
revenue: float = 0.0
206+
licenses_count: int = 0
207+
208+
186209
class ValidationResult(BaseLicenseChainModel):
187210
"""License validation result model."""
188211

0 commit comments

Comments
 (0)