import datetime as dt

from interloper.schema import AssetSchema
from pydantic import Field


class Ads(AssetSchema):
    account_descriptive_name: str = Field(..., description="The descriptive name of the account")
    account_id: int = Field(..., description="The account ID")
    ad_name: str = Field(..., description="The name of the ad")
    adgroup_id: int = Field(..., description="The ad group ID")
    adgroup_name: str = Field(..., description="The name of the ad group")
    adgroup_status: str = Field(..., description="The status of the ad group")
    all_conversions: int = Field(..., description="The total number of conversions")
    average_cost: int = Field(..., description="The average cost")
    average_cpc: int = Field(..., description="The average cost per click")
    average_cpm: int = Field(..., description="The average cost per thousand impressions")
    average_position: float = Field(..., description="The average position")
    campaign_id: int = Field(..., description="The campaign ID")
    campaign_name: str = Field(..., description="The name of the campaign")
    campaign_status: str = Field(..., description="The status of the campaign")
    clicks: int = Field(..., description="The total number of clicks")
    conversion_rate: float = Field(..., description="The conversion rate")
    conversions: int = Field(..., description="The total number of conversions")
    cost: int = Field(..., description="The total cost")
    cost_per_all_conversion: int = Field(..., description="The cost per all conversion")
    cost_per_conversion: int = Field(..., description="The cost per conversion")
    creative_final_mobile_url: str = Field(..., description="The final mobile URL of the creative")
    creative_final_url: str = Field(..., description="The final URL of the creative")
    creative_final_url_suffix: str = Field(..., description="The final URL suffix of the creative")
    ctr: float = Field(..., description="The click-through rate")
    date: dt.date = Field(..., description="The date of the data")
    description: str = Field(..., description="The description")
    display_url: str = Field(..., description="The display URL")
    headline: str = Field(..., description="The headline")
    id: int = Field(..., description="The ID")
    impressions: int = Field(..., description="The total number of impressions")
    interaction_rate: float = Field(..., description="The interaction rate")
    interactions: int = Field(..., description="The total number of interactions")
    path1: str = Field(..., description="The first path")
    path2: str = Field(..., description="The second path")
    view_through_conversions: int = Field(..., description="The total number of view-through conversions")
