export interface IResponse<T> extends Promise<T> {
  code: number;
  data?: T;
  msg: string;
}

export interface IUser {
  uid: number | string;
  nickname: string;
  token: string;
}

export interface IMeta {
  current_page: number;
  next_page: number;
  last_page: number;
  per_page: number;
  total: number;
  is_end: boolean;
  next_page_url: string;
  prev_page_url: string;
}

export interface IList<T> {
  meta: IMeta;
  list: T[];
}

export interface IBookSearchResult {
  id: number;
  bid: string;
  name: string;
  platform: string;
}

export interface IDeliveryBook {
  id: number;
  bid: number | string;
  book_name: string;
  delivery_bid: number;
  delivery_platform: string;
  status: number;
  start_time: string;
  end_time: string;
  official_name: string;
}

export interface IOfficialSimple {
  id: number;
  name: string;
}

export interface ADpushSimple {
  id: number;
  email: string;
  account_id: string | number;
  account_name: string;
  delivery_platform: string;
  user_name: string;
  status: string | number;
}

export interface PageOptions {
  current: number;
  pageSize: number;
  total: number;
}

export interface IOfficials {
  id: number;
  start_time: string;
  end_time: string;
  app_id?: string;
  platform: string;
  channel_id: number;
  account_name: string;
  nickname: string;
  report_module?: string;
}
export interface ILogitem {
  order_no: string;
  guid: string;
  platform: string;
  register_time: string;
  pay_time: string;
  pay_amount: string;
  report_status: string;
  reason: string;
  back_percentage: number;
  config_back_percentage: number;
  report_type: string;
  appflag: string;
}

export interface ADPlanItem {
  ad_id: string | number;
  ad_name: string;
  status: string | number;
  cpa_bid: string | number;
  ad_create_time: string;
  external_url: string;
  uid: string;
  delivery_platform: string;
  cost: number;
  show: string;
  crt: string;
  click: number | string;
  avg_click_cost: number;
  avg_show_cost: number;
  convert: number;
  convert_cost: number;
  convert_rate: number;
  campaign_name: string;
  email: string;
  account_name: string;
  start_time: string;
  end_time: string;
  budget: string;
  id: string;
  aim: string;
  is_enable: number;
  enable: boolean;
  popShow: boolean;
}

export interface deliveryPlanItem {
  date: string;
  official_id: number;
  official_name: string;
  book_name: string;
  bid: number;
  cost: number;
  register_num: number;
  delivery_platform: string;
  register_cost: number;
  pay_fans_cost: number;
  recovery_rate: string;
  h24_recovery_rate: string;
  d3_recovery_rate: string;
  d7_recovery_rate: string;
  d30_recovery_rate: string;
}

export interface moreStatPlanItem {
  date: string;
  official_id: number;
  official_name: string;
  book_name: string;
  bid: number;
  cost: number;
  register_num: number;
  delivery_platform: string;
  register_cost: number;
  pay_fans_cost: number;
  d1_recovery_rate: string;
  d2_recovery_rate: string;
  d3_recovery_rate: string;
  d4_recovery_rate: string;
  d5_recovery_rate: string;
  d6_recovery_rate: string;
  d7_recovery_rate: string;
  d8_recovery_rate: string;
  d9_recovery_rate: string;
  d10_recovery_rate: string;
  d11_recovery_rate: string;
  d12_recovery_rate: string;
  d13_recovery_rate: string;
  d14_recovery_rate: string;
  d15_recovery_rate: string;
  d16_recovery_rate: string;
  d17_recovery_rate: string;
  d18_recovery_rate: string;
  d19_recovery_rate: string;
  d20_recovery_rate: string;
  d21_recovery_rate: string;
  d22_recovery_rate: string;
  d23_recovery_rate: string;
  d24_recovery_rate: string;
  d25_recovery_rate: string;
  d26_recovery_rate: string;
  d27_recovery_rate: string;
  d28_recovery_rate: string;
  d29_recovery_rate: string;
  d30_recovery_rate: string;
  d31_recovery_rate: string;
  d32_recovery_rate: string;
  d33_recovery_rate: string;
  d34_recovery_rate: string;
  d35_recovery_rate: string;
  d36_recovery_rate: string;
  d37_recovery_rate: string;
  d38_recovery_rate: string;
  d39_recovery_rate: string;
  d40_recovery_rate: string;
  d41_recovery_rate: string;
  d42_recovery_rate: string;
  d43_recovery_rate: string;
  d44_recovery_rate: string;
  d45_recovery_rate: string;
  d46_recovery_rate: string;
  d47_recovery_rate: string;
  d48_recovery_rate: string;
  d49_recovery_rate: string;
  d50_recovery_rate: string;
  d51_recovery_rate: string;
  d52_recovery_rate: string;
  d53_recovery_rate: string;
  d54_recovery_rate: string;
  d55_recovery_rate: string;
  d56_recovery_rate: string;
  d57_recovery_rate: string;
  d58_recovery_rate: string;
  d59_recovery_rate: string;
  d60_recovery_rate: string;
  d61_recovery_rate: string;
  d62_recovery_rate: string;
  d63_recovery_rate: string;
  d64_recovery_rate: string;
  d65_recovery_rate: string;
  d66_recovery_rate: string;
  d67_recovery_rate: string;
  d68_recovery_rate: string;
  d69_recovery_rate: string;
  d70_recovery_rate: string;
  d71_recovery_rate: string;
  d72_recovery_rate: string;
  d73_recovery_rate: string;
  d74_recovery_rate: string;
  d75_recovery_rate: string;
  d76_recovery_rate: string;
  d77_recovery_rate: string;
  d78_recovery_rate: string;
  d79_recovery_rate: string;
  d80_recovery_rate: string;
  d81_recovery_rate: string;
  d82_recovery_rate: string;
  d83_recovery_rate: string;
  d84_recovery_rate: string;
  d85_recovery_rate: string;
  d86_recovery_rate: string;
  d87_recovery_rate: string;
  d88_recovery_rate: string;
  d89_recovery_rate: string;
  d90_recovery_rate: string;
  d91_recovery_rate: string;
  d92_recovery_rate: string;
  d93_recovery_rate: string;
  d94_recovery_rate: string;
  d95_recovery_rate: string;
  d96_recovery_rate: string;
  d97_recovery_rate: string;
  d98_recovery_rate: string;
  d99_recovery_rate: string;
  d100_recovery_rate: string;
  d101_recovery_rate: string;
  d102_recovery_rate: string;
  d103_recovery_rate: string;
  d104_recovery_rate: string;
  d105_recovery_rate: string;
  d106_recovery_rate: string;
  d107_recovery_rate: string;
  d108_recovery_rate: string;
  d109_recovery_rate: string;
  d110_recovery_rate: string;
  d111_recovery_rate: string;
  d112_recovery_rate: string;
  d113_recovery_rate: string;
  d114_recovery_rate: string;
  d115_recovery_rate: string;
  d116_recovery_rate: string;
  d117_recovery_rate: string;
  d118_recovery_rate: string;
  d119_recovery_rate: string;
  d120_recovery_rate: string;
}

export interface IPlatform {
  desc: string;
  name: string;
}

export interface adPlanLog {
  advertiser_id: string;
  object_id: string;
  object_type: string;
  object_name: string;
  content_log: any;
  operator: string;
  create_time: string;
  opt_ip: string;
}

export interface adPlanCount {
  email: string;
  account_name: string;
  ad_id: string;
  ad_name: string;
  register_num: number;
  recharge_amount: number;
  pay_num: string;
  second_pay_num: number;
  [key: string]: string;
}

export interface PlanBack {
  id?: string;
  ad_lid?: string;
  report_type?: string;
  back_platform?: string;
  back_on: number | boolean;
  rate: number;
  price?: number;
  condition: number;
  float_rate?: string;
  extra?: {
    price?: number;
    float_rate?: string;
  };
}

export interface RegisterData {
  platform: string;
  channel_id: number;
  register_ip: string;
  register_time: string;
  ad_lid: number;
  back_platform: string;
  report_register_num: number;
  report_recharge_num: number;
  report_sactive_num: number;
}

export interface FinanceData {
  date: string;
  advertiser_id: string;
  balance: number;
  cash_cost: number;
  cost: number;
  frozen: number;
  income: string;
  reward_cost: number;
  return_goods_cost: number;
  transfer_in: number;
  transfer_out: number;
  advertiser_name: string;
  company_name: string;
}

export interface AdGroupData {
  id: string;
  uid: string;
  advertiser_id: string;
  campaign_id: string | number;
  campaign_name: string;
  landing_type: number | string;
  budget: number | string;
  status: number | string;
  budget_mode: number | string;
  delivery_related_num: number;
  delivery_mode: number;
  is_enable: number | string | boolean;
  cost: string;
  show: string;
  ctr: string;
  click: string;
  avg_click_cost: string;
  avg_show_cost: string;
  convert: number;
  convert_cost: number;
  convert_rate: number;
}

export interface AdgroupList {
  id: string;
  advertiser_id: string;
  advertiser_name: string;
  budget: number | string;
  budget_mode: number | string;
  budget_mode_name: string;
  cost: string;
  show: string;
  ctr: string;
  click: string;
  avg_click_cost: string;
  avg_show_cost: string;
  convert: number;
  convert_cost: number;
  convert_rate: number;
}

export interface GroupDatas {
  cost: number;
  show: number;
  click: number;
  convert: number;
  convert_cost: number;
  convert_rate: number;
  avg_click_cost: number;
  avg_show_cost: number;
  ctr: number;
}

export interface OListItem {
  id: number;
  app_name: string;
  appflag: string;
  rate: number;
  platform: string;
  condition: string;
}

interface IUserAdmin {
  uid: number;
  showDropDownBox: boolean;
  available_uids: IUserItem[];
  filter_users: IUserItem[];
}

interface IUserItem {
  account: string;
  nickname: string;
  id: number;
}
interface IGroupItem {
  group_name: string;
  group_id: string;
  users: any[];
}
interface AccountPlanConfig {
  ad_config: {
    channel_id: string;
    id: number;
    rate: number;
  };
  channel_configs: PlanBack[];
  channel_id: number | string;
  report_module: string;
}

interface IGZHItem {
  gzh_name: string;
  gzh_code: string;
  gzh_img: string;
  sub_img: string;
}

interface IDomainItem {
  domain: string;
  company_name: string;
}

interface IPBookItem {
  bid: string | number;
  book_name: string;
}
