first commit
This commit is contained in:
21
app/models.py
Normal file
21
app/models.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Offer:
|
||||
source: str
|
||||
external_id: str
|
||||
title: str
|
||||
description: str
|
||||
price: str
|
||||
price_amount: int | None
|
||||
url: str
|
||||
category_id: int
|
||||
published_at: str
|
||||
seller_username: str | None = None
|
||||
|
||||
@property
|
||||
def dedup_key(self) -> str:
|
||||
return f"{self.source}:{self.external_id}"
|
||||
Reference in New Issue
Block a user