Coverage for polar/customer_portal/schemas/downloadables.py: 100%
10 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 12:42 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 12:42 +0000
1from datetime import datetime
3from pydantic import UUID4
5from polar.benefit.schemas import BenefitID
6from polar.file.schemas import FileDownload
7from polar.kit.schemas import Schema
8from polar.models.downloadable import DownloadableStatus
11class DownloadableURL(Schema):
12 url: str
13 expires_at: datetime
16class DownloadableRead(Schema):
17 id: UUID4
18 benefit_id: UUID4
20 file: FileDownload
23class DownloadableCreate(Schema):
24 file_id: UUID4
25 customer_id: UUID4
26 benefit_id: BenefitID
27 status: DownloadableStatus
30class DownloadableUpdate(Schema):
31 file_id: UUID4
32 customer_id: UUID4
33 benefit_id: BenefitID
34 status: DownloadableStatus