import numpy as np


DTYPE_PARAMS = {
    'MMS': {
        'STORE_SKC_WEEK': {
            'store_code': str,
            'skc_code': str,
            'year_code': str,
            'week_code': 'category',
            'year_week_code': str,
            'prev_year_week_code': str,
            'interval_weeks_to_prev': np.int16,
            'list_dates_year_code': str,
            'list_dates_week_code': str,
            'list_dates_year_week_code': str,
            'interval_weeks_to_list': np.int16,
            'city_name': 'category',
            'area_code': 'category',
            'sales_channel': 'category',
            'store_type': 'category',
            'store_level': 'category',
            'store_retail_amount_highest_8week': np.float32,
            'store_retail_amount_lowest_8week': np.float32,
            'store_retail_amount_mean_8week': np.float32,
            'store_retail_amount_gap_8week': np.float32,
            'store_sales_amount_highest_8week': np.float32,
            'store_sales_amount_lowest_8week': np.float32,
            'store_sales_amount_mean_8week': np.float32,
            'store_sales_amount_gap_8week': np.float32,
            'store_discount_rate_mean_8week': np.float32,
            'main_cate': 'category',
            'sub_cate': 'category',
            'leaf_cate': 'category',
            'leaf_cate_retail_amount_highest_8week': np.float32,
            'leaf_cate_retail_amount_lowest_8week': np.float32,
            'leaf_cate_retail_amount_mean_8week': np.float32,
            'leaf_cate_retail_amount_gap_8week': np.float32,
            'leaf_cate_sales_amount_highest_8week': np.float32,
            'leaf_cate_sales_amount_lowest_8week': np.float32,
            'leaf_cate_sales_amount_mean_8week': np.float32,
            'leaf_cate_sales_amount_gap_8week': np.float32,
            'leaf_cate_discount_rate_mean_8week': np.float32,
            'color_code': 'category',
            'lining': 'category',
            'customer_level_1_last_week': np.int16,
            'customer_level_2_last_week': np.int16,
            'customer_level_3_last_week': np.int16,
            'customer_level_1_proportion_last_week': np.float32,
            'customer_level_2_proportion_last_week': np.float32,
            'customer_level_3_proportion_last_week': np.float32,
            'customer_level_1_last_2week': np.int16,
            'customer_level_2_last_2week': np.int16,
            'customer_level_3_last_2week': np.int16,
            'customer_level_1_proportion_last_2week': np.float32,
            'customer_level_2_proportion_last_2week': np.float32,
            'customer_level_3_proportion_last_2week': np.float32,
            'customer_level_1_gap':np.int16,
            'customer_level_2_gap':np.int16,
            'customer_level_3_gap':np.int16,
            'special_day_type': 'category',
            'weather_day_most': 'category',
            'weather_night_most': 'category',
            'tempreture_day_highest': np.int8,
            'tempreture_day_highest_last_week': np.int8,
            'tempreture_day_highest_gap': np.int8,
            'tempreture_day_lowest': np.int8,
            'tempreture_day_lowest_last_week': np.int8,
            'tempreture_day_lowest_gap': np.int8,
            'tempreture_day_avg': np.float32,
            'tempreture_day_avg_last_week': np.float32,
            'tempreture_day_avg_gap': np.float32,
            'tempreture_day_gap': np.int8,
            'tempreture_day_gap_last_week': np.int8,
            'tempreture_night_highest': np.int8,
            'tempreture_night_highest_last_week': np.int8,
            'tempreture_night_highest_gap': np.int8,
            'tempreture_night_lowest': np.int8,
            'tempreture_night_lowest_last_week': np.int8,
            'tempreture_night_lowest_gap': np.int8,
            'tempreture_night_avg': np.float32,
            'tempreture_night_avg_last_week': np.float32,
            'tempreture_night_avg_gap': np.float32,
            'tempreture_night_gap': np.int8,
            'tempreture_night_gap_last_week': np.int8,
            'tempreture_avg_gap': np.float32,
            'tempreture_avg_gap_last_week': np.float32,
            'retail_amount_mean': np.float32,
            'retail_amount_mean_gap_with_store': np.float32,
            'discount_rate_mean_last_week': np.float32,
            'discount_rate_mean_last_2week': np.float32,
            'discount_rate_mean_gap_1_2': np.float32,
            'skc_con_sale_rate_last_week': np.float32,
            'skc_con_sale_rate_last_2week': np.float32,
            'skc_con_sale_rate_gap_1_2': np.float32,
            'sales_qty_last_week': np.int16,
            'sales_qty_last_2week': np.int16,
            'sales_qty_gap_1_2': np.int16,
            'sales_qty': np.int16,
            'sales_qty_type': str
        },

        'STORE_SC_WEEK': {
            'store_code': str,
            'sub_cate': str,
            'year_code': str,
            'week_code': 'category',
            'year_week_code': str,
            'city_name': 'category',
            'area_code': 'category',
            'utility_area': np.float32,
            'store_sales_amount_per_utility_area_mean_8week': np.float32,
            'store_sales_qty_mean_8week': np.float32,
            'store_sales_qty_std_8week': np.float32,
            'store_sales_qty_last_week': np.int16,
            'store_sales_qty_last_2week': np.int16,
            'store_sales_qty_gap': np.int16,
            'sub_cate_retail_amount_highest_8week': np.float32,
            'sub_cate_retail_amount_lowest_8week': np.float32,
            'sub_cate_retail_amount_mean_8week': np.float32,
            'sub_cate_retail_amount_std_8week': np.float32,
            'sub_cate_retail_amount_skewness_8week': np.float32,
            'sub_cate_retail_amount_kurtosis_8week': np.float32,
            'sub_cate_discount_rate_kurtosis_8week': np.float32,
            'sub_cate_sales_qty_mean_8week': np.float32,
            'sub_cate_sales_qty_std_8week': np.float32,
            'sub_cate_sales_qty_skewness_8week': np.float32,
            'sub_cate_sales_qty_kurtosis_8week': np.float32,
            'sub_cate_sales_qty_last_week': np.int16,
            'sub_cate_sales_qty_last_2week': np.int16,
            'sub_cate_sales_qty_gap_1_2': np.int16,
            'sub_cate_sc_con_sale_rate_last_week': np.float32,
            'sub_cate_sc_con_sale_rate_last_2week': np.float32,
            'sub_cate_sc_con_sale_rate_gap_1_2': np.float32,
            'customer_level_1_gap': np.int16,
            'special_day_type': 'category',
            'tempreture_day_avg': np.float32,
            'tempreture_day_avg_gap': np.float32,
            'tempreture_night_avg': np.float32,
            'tempreture_night_avg_gap': np.float32,
            'tempreture_avg_gap': np.float32,
            'sub_cate_retail_amount_mean': np.float32,
            'sub_cate_retail_amount_mean_gap_with_store': np.float32,
            'sales_qty': np.int16
        },

        'REGION_SKC_WEEK': {
            'region_code': str,
            'skc_code': str,
            'year_code': str,
            'week_code': 'category',
            'year_week_code': str,
            'list_dates_year_code': str,
            'list_dates_week_code': str,
            'list_dates_year_week_code': str,
            'interval_weeks_to_list': np.int8,
            'region_sales_qty_per_skc_mean_8week': np.float32,
            'region_sales_qty_per_skc_std_8week': np.float32,
            'region_sales_qty_per_skc_last_week': np.float32,
            'region_sales_qty_per_skc_last_2week': np.float32,
            'region_sales_qty_per_skc_gap': np.float32,
            'region_store_qty_mean_8week': np.float32,
            'region_store_qty_std_8week': np.float32,
            'region_store_qty_last_week': np.int16,
            'region_store_qty_last_2week': np.int16,
            'region_store_qty_gap': np.int16,
            'main_cate': 'category',
            'leaf_cate': 'category',
            'color_code': 'category',
            'lining': 'category',
            'leaf_cate_sales_qty_last_week': np.int16,
            'leaf_cate_sales_qty_last_2week': np.int16,
            'leaf_cate_sales_qty_gap_1_2': np.int16,
            'skc_discount_rate_mean_8week': np.float32,
            'skc_discount_rate_kurtosis_8week': np.float32,
            'skc_sales_qty_mean_8week': np.float32,
            'skc_sales_qty_std_8week': np.float32,
            'skc_sales_qty_skewness_8week': np.float32,
            'skc_sales_qty_kurtosis_8week': np.float32,
            'skc_sales_qty_last_week': np.int16,
            'skc_sales_qty_last_2week': np.int16,
            'skc_sales_qty_gap_1_2': np.int16,
            'customer_level_1_gap': np.int16,
            'customer_level_2_gap': np.int16,
            'customer_level_3_gap': np.int16,
            'special_day_type': 'category',
            'tempreture_day_avg': np.float32,
            'tempreture_day_avg_gap': np.float32,
            'tempreture_night_avg': np.float32,
            'tempreture_night_avg_gap': np.float32,
            'tempreture_avg_gap': np.float32,
            'skc_retail_amount_mean': np.float32,
            'skc_retail_amount_mean_gap_with_region': np.float32,
            'sales_qty': np.int8
        }
    }
}