use serde::{Deserialize, Serialize};

use super::response::EnrichmentResponse;

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(default)]
pub struct BusinessSummaryResponse {
    pub smarty_key: String,
    pub data_set_name: String,
    pub businesses: Vec<BusinessSummaryEntry>,
}

impl EnrichmentResponse for BusinessSummaryResponse {
    fn lookup_type() -> &'static str {
        "business"
    }
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(default)]
pub struct BusinessSummaryEntry {
    pub company_name: String,
    pub business_id: String,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(default)]
pub struct BusinessDetailResponse {
    pub smarty_key: String,
    pub data_set_name: String,
    pub business_id: String,
    pub attributes: BusinessDetailAttributes,
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(default)]
pub struct BusinessDetailAttributes {
    pub accounting_expense_range: String,
    pub accounting_expense_total: String,
    pub advertising_expense_range: String,
    pub advertising_expense_total: String,
    pub business_insurance_expense_range: String,
    pub business_insurance_expense_total: String,
    pub business_status: String,
    pub business_type: String,
    pub carrier_route: String,
    pub census_block: String,
    pub census_tract: String,
    pub city_name: String,
    pub company_name: String,
    pub company_name_secondary: String,
    pub contact_first_name: String,
    pub contact_full_name: String,
    pub contact_gender: String,
    pub contact_last_name: String,
    pub contact_middle_name: String,
    pub contact_prefix: String,
    pub contact_professional_title: String,
    pub contact_suffix: String,
    pub core_based_stat_area_code: String,
    pub core_based_stat_area_name: String,
    pub corporate_employee_count_range: String,
    pub corporate_employee_count_total: String,
    pub county_fips: String,
    pub county_name: String,
    pub credit_capacity: String,
    pub credit_capacity_range: String,
    pub credit_score: String,
    pub credit_score_description: String,
    pub date_of_last_update: String,
    pub delivery_line_1: String,
    pub delivery_point: String,
    pub delivery_point_check_digit: String,
    pub domestic_foreign_owner_indicator: String,
    pub ein: String,
    pub email: String,
    pub email_available_indicator: String,
    pub executive_department: String,
    pub executive_level: String,
    pub executive_verification_type: String,
    pub fax: String,
    pub female_owned_indicator: String,
    pub foreign_parent_city_name: String,
    pub foreign_parent_company_name: String,
    pub foreign_parent_country: String,
    pub fortune_1000_branches: String,
    pub fortune_1000_indicator: String,
    pub fortune_1000_rank: String,
    pub holding_city_name: String,
    pub holding_company_name: String,
    pub holding_id: String,
    pub holding_state_abbreviation: String,
    pub home_based_business_indicator: String,
    pub hq_city_name: String,
    pub hq_company_name: String,
    pub hq_id: String,
    pub hq_number_of_companies: String,
    pub hq_state_abbreviation: String,
    pub latitude: String,
    pub legal_expense_range: String,
    pub legal_expense_total: String,
    pub linkage_company_name: String,
    pub linkage_indicator: String,
    pub linkage_level: String,
    pub linkage_type: String,
    pub location_employee_count: String,
    pub location_employee_count_range: String,
    pub location_sales_range: String,
    pub location_sales_total: String,
    pub longitude: String,
    pub mail_score_code: String,
    pub mail_score_description: String,
    pub mailing_carrier_route: String,
    pub mailing_city_name: String,
    pub mailing_delivery_line_1: String,
    pub mailing_delivery_point: String,
    pub mailing_delivery_point_check_digit: String,
    pub mailing_plus4_code: String,
    pub mailing_state_abbreviation: String,
    pub mailing_zipcode: String,
    pub manufacturing_indicator: String,
    pub minority_owned_indicator: String,
    pub minority_type: String,
    pub naics_01_code: String,
    pub naics_01_description: String,
    pub naics_02_code: String,
    pub naics_02_description: String,
    pub naics_03_code: String,
    pub naics_03_description: String,
    pub naics_04_code: String,
    pub naics_04_description: String,
    pub naics_05_code: String,
    pub naics_05_description: String,
    pub naics_06_code: String,
    pub naics_06_description: String,
    pub new_business_indicator: String,
    pub non_profit_indicator: String,
    pub num_of_pcs_range: String,
    pub num_of_pcs_total: String,
    pub number_of_years_in_business: String,
    pub number_of_years_in_business_range: String,
    pub office_equipment_expense_range: String,
    pub office_equipment_expense_total: String,
    pub operating_hours_friday: String,
    pub operating_hours_monday: String,
    pub operating_hours_saturday: String,
    pub operating_hours_sunday: String,
    pub operating_hours_thursday: String,
    pub operating_hours_tuesday: String,
    pub operating_hours_wednesday: String,
    pub phone: String,
    pub phone_area_code: String,
    pub phone_secondary: String,
    pub phone_toll_free: String,
    pub plus4_code: String,
    pub population_range: String,
    pub precision: String,
    pub primary_executive_indicator: String,
    pub primary_number: String,
    pub primary_sic_2digit_code: String,
    pub primary_sic_2digit_description: String,
    pub primary_sic_4digit_code: String,
    pub primary_sic_4digit_description: String,
    pub primary_sic_code: String,
    pub primary_sic_description: String,
    pub public_indicator: String,
    pub rdi: String,
    pub rent_expense_range: String,
    pub rent_expense_total: String,
    pub secondary_01_sic_7digit_code: String,
    pub secondary_01_sic_7digit_description: String,
    pub secondary_02_sic_7digit_code: String,
    pub secondary_02_sic_7digit_description: String,
    pub secondary_03_sic_7digit_code: String,
    pub secondary_03_sic_7digit_description: String,
    pub secondary_04_sic_7digit_code: String,
    pub secondary_04_sic_7digit_description: String,
    pub secondary_05_sic_7digit_code: String,
    pub secondary_05_sic_7digit_description: String,
    pub secondary_designator: String,
    pub secondary_number: String,
    pub sectional_center_facility: String,
    pub small_business_indicator: String,
    pub source_title: String,
    pub square_footage: String,
    pub square_footage_range: String,
    pub standardized_title: String,
    pub standardized_title_rank: String,
    pub state_abbreviation: String,
    pub stock_exchange: String,
    pub street_name: String,
    pub street_postdirection: String,
    pub street_predirection: String,
    pub street_suffix: String,
    pub sub_hq_city_name: String,
    pub sub_hq_company_name: String,
    pub sub_hq_id: String,
    pub sub_hq_number_of_companies: String,
    pub sub_hq_state_abbreviation: String,
    pub technology_expense_range: String,
    pub technology_expense_total: String,
    pub telecom_expense_range: String,
    pub telecom_expense_total: String,
    pub ticker_symbol: String,
    pub time_zone: String,
    pub url: String,
    pub url_facebook: String,
    pub url_instagram: String,
    pub url_linkedin: String,
    pub url_twitter: String,
    pub url_yelp: String,
    pub url_youtube: String,
    pub utilities_expense_range: String,
    pub utilities_expense_total: String,
    pub webmail_indicator: String,
    pub year_current: String,
    pub year_current_employee_count: String,
    pub year_established: String,
    pub year_four_prior: String,
    pub year_four_prior_employee_count: String,
    pub year_four_prior_employee_growth: String,
    pub year_one_prior: String,
    pub year_one_prior_employee_count: String,
    pub year_one_prior_employee_growth: String,
    pub year_three_prior: String,
    pub year_three_prior_employee_count: String,
    pub year_three_prior_employee_growth: String,
    pub year_two_prior: String,
    pub year_two_prior_employee_count: String,
    pub year_two_prior_employee_growth: String,
    pub zipcode: String,
}
