from collections import namedtuple from dataclasses import dataclass from datetime import date from typing import List, Optional TikTokCampaignsQueryResult = namedtuple( "TikTokCampaignsQueryResult", [ "campaign_name", "external_id", "start_date", "end_date", "marketing_account_id", "objective", "budget_spend", "planned_budget", "genders", "country_codes", "ages", "artists" ], ) TikTokAdSetsQueryResult = namedtuple( "TikTokAdSetsQueryResult", [ "ad_set_id", "ad_set_name", "campaign_id", "start_date", "end_date", "destination_link", "objective", "planned_budget", "budget_spend", "genders", "country_codes", "ages", ], ) @dataclass class TikTokCampaignModel: name: str id: int start_date: date end_date: date marketing_account_id: int objective: str planned_budget: float budget_spend: float genders: List[str] country_codes: List[str] ages: List[str] artists: Optional[List] @dataclass class TikTokAdSetModel: name: str id: int campaign_id: int start_date: date end_date: date destination_link: str objective: str planned_budget: float budget_spend: float genders: List[str] country_codes: List[str] ages: List[str]