17 lines
652 B
Python
17 lines
652 B
Python
import datetime
|
|
|
|
import patito as pt
|
|
|
|
|
|
class Deal(pt.Model):
|
|
source: str = pt.Field(description="Source of the deal, e.g., 'plato' or 'sounds'.")
|
|
id: str = pt.Field(description="Unique identifier that is used at the source.")
|
|
artist: str = pt.Field(description="Artist.")
|
|
title: str = pt.Field(description="Title of the deal.")
|
|
url: str = pt.Field(description="URL to the deal.")
|
|
date: datetime.date = pt.Field(description="Day the deal was listed.")
|
|
release: datetime.date | None = pt.Field(
|
|
description="Release date.", allow_missing=True
|
|
)
|
|
price: float = pt.Field(description="Price of the deal in EUR.")
|