# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class Campaign(UniversalBaseModel):
    """
    Marketing campaign
    """

    name: str
    type: typing.Optional[str] = pydantic.Field(default=None)
    """
    e.g., Email, Webinar, Conference
    """

    status: typing.Optional[str] = None
    start_date: typing.Optional[str] = pydantic.Field(default=None)
    """
    YYYY-MM-DD
    """

    end_date: typing.Optional[str] = pydantic.Field(default=None)
    """
    YYYY-MM-DD
    """

    expected_revenue: typing.Optional[float] = None
    budget: typing.Optional[float] = None
    actual_cost: typing.Optional[float] = None
    description: typing.Optional[str] = None
    active: typing.Optional[bool] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
