// Copyright 2019 getensh.com. All rights reserved.
// Use of this source code is governed by getensh.com.
package param_v1_0

import (
	"gd_management_gateway/params/param_base"
	"gd_management_gateway/rpc_apis/gd_statistics"
)

type BiGetDashReq struct {
	param_base.BasicParam
}

type BiDashVehicle struct {
	Count    int64 `json:"count"`
	Increase int64 `json:"increase"`
}

type BiDashCharge struct {
	Charge     int64   `json:"charge"`
	ChargeRate float64 `json:"charge_rage"`
	Increase   string  `json:"increase"`
}

type BiDashFail struct {
	Fail     int64   `json:"fail"`
	FailRate float64 `json:"fail_rate"`
	Increase string  `json:"increase"`
}

type BiDash struct {
	VehicleInfo BiDashVehicle `json:"vehicle_info"`
	ChargeInfo  BiDashCharge  `json:"charge_info"`
	FailInfo    BiDashFail    `json:"fail_info"`
}

type BiGetDashResp struct {
	param_base.SimpleResp
	DashInfo BiDash `json:"dash_info"`
}

type BiGetServiceStatusReq struct {
	param_base.BasicParam
	StartTimestamp    int64  `json:"start_timestamp" in:"query"`
	EndTimestamp      int64  `json:"end_timestamp" in:"query"`
	MerchantId        int64  `json:"merchant_id" in:"query"`
	ApiId             string `json:"api_id" in:"query"`
	TodayEndTimestamp int64  `json:"today_end_timestamp" in:"query"`
	TimeType          int    `json:"time_type" in:"query" description:"0按天1按时"`
}

type BiGetServiceStatusResp struct {
	param_base.SimpleResp
	Infos []gd_statistics.ServiceStatus `json:"data"`
}

type BiGetProviderServiceStatusReq struct {
	param_base.BasicParam
	StartTimestamp    int64  `json:"start_timestamp" in:"query"`
	EndTimestamp      int64  `json:"end_timestamp" in:"query"`
	ProviderApiId     string `json:"provider_api_id" in:"query"`
	TodayEndTimestamp int64  `json:"today_end_timestamp" in:"query"`
	TimeType          int    `json:"time_type" in:"query" description:"0按天1按时"`
}

type BiGetProviderServiceStatusResp struct {
	param_base.SimpleResp
	Infos []gd_statistics.ServiceStatus `json:"data"`
}

type BiGetTrendReq struct {
	param_base.BasicParam
	StartTimestamp    int64  `json:"start_timestamp" in:"query"`
	EndTimestamp      int64  `json:"end_timestamp" in:"query"`
	MerchantId        int64  `json:"merchant_id" in:"query"`
	ApiId             string `json:"api_id" in:"query"`
	TodayEndTimestamp int64  `json:"today_end_timestamp" in:"query"`
	TimeType          int    `json:"time_type" in:"query" description:"0按天1按时"`
}

type BiGetTrendResp struct {
	param_base.SimpleResp
	Data gd_statistics.BiGetTrendReply `json:"data"`
}

type BiGetProviderTrendReq struct {
	param_base.BasicParam
	StartTimestamp    int64  `json:"start_timestamp" in:"query"`
	EndTimestamp      int64  `json:"end_timestamp" in:"query"`
	ProviderApiId     string `json:"provider_api_id" in:"query"`
	TodayEndTimestamp int64  `json:"today_end_timestamp" in:"query"`
	TimeType          int    `json:"time_type" in:"query" description:"0按天1按时"`
}

type BiGetProviderTrendResp struct {
	param_base.SimpleResp
	Data gd_statistics.BiGetProviderTrendReply `json:"data"`
}

type BiGetReportReq struct {
	param_base.BasicParam
	StartTimestamp    int64  `json:"start_timestamp" in:"query"`
	EndTimestamp      int64  `json:"end_timestamp" in:"query"`
	MerchantId        int64  `json:"merchant_id" in:"query"`
	ApiId             string `json:"api_id" in:"query"`
	PageNumber        int    `json:"page_number" in:"query"`
	PageSize          int    `json:"page_size" in:"query"`
	TodayEndTimestamp int64  `json:"today_end_timestamp" in:"query"`
}

type ReportData struct {
	PageSize int                           `json:"page_size"`
	Total    int                           `json:"total"`
	Infos    []gd_statistics.BiReportInfo `json:"infos"`
	Sum      gd_statistics.BiReportInfo   `json:"sum"`
}

type BiGetReportResp struct {
	param_base.SimpleResp
	Data ReportData `json:"data"`
}

type BiGetProviderReportReq struct {
	param_base.BasicParam
	StartTimestamp    int64  `json:"start_timestamp" in:"query"`
	EndTimestamp      int64  `json:"end_timestamp" in:"query"`
	ProviderApiId     string `json:"provider_api_id" in:"query"`
	PageNumber        int    `json:"page_number" in:"query"`
	PageSize          int    `json:"page_size" in:"query"`
	TodayEndTimestamp int64  `json:"today_end_timestamp" in:"query"`
}

type ProviderReportData struct {
	Total      int                                   `json:"total"`
	PageSize   int                                   `json:"page_size"`
	PageNumber int                                   `json:"page_number"`
	Infos      []gd_statistics.BiProviderReportInfo `json:"infos"`
	Sum        gd_statistics.BiProviderReportInfo   `json:"sum"`
}

type BiGetProviderReportResp struct {
	param_base.SimpleResp
	Data ProviderReportData `json:"data"`
}

type BiGetDistributionReq struct {
	param_base.BasicParam
	ApiId             string `json:"api_id" in:"query"`
	MerchantId        int64  `json:"merchant_id" in:"query"`
	StartTimestamp    int64  `json:"start_timestamp" in:"query"`
	EndTimestamp      int64  `json:"end_timestamp" in:"query"`
	TodayEndTimestamp int64  `json:"today_end_timestamp" in:"query"`
}

type BiGetDistributionResp struct {
	param_base.SimpleResp
	Info gd_statistics.BiDistribution `json:"data"`
}

type BiGetProviderDistributionReq struct {
	param_base.BasicParam
	ProviderApiId     string `json:"provider_api_id" in:"query"`
	StartTimestamp    int64  `json:"start_timestamp" in:"query"`
	EndTimestamp      int64  `json:"end_timestamp" in:"query"`
	TodayEndTimestamp int64  `json:"today_end_timestamp" in:"query"`
}

type BiGetProviderDistributionResp struct {
	param_base.SimpleResp
	Info gd_statistics.BiProviderDistribution `json:"data"`
}

type BiGetApiServiceDataInfoReq struct {
	param_base.BasicParam
	ApiId             int64 `json:"api_id" in:"query"`
	TodayEndTimestamp int64 `json:"today_end_timestamp" in:"query"`
}

type BiGetApiServiceDataInfoResp struct {
	param_base.SimpleResp
	Info gd_statistics.ApiServiceAllDataInfo `json:"data"`
}

type BiGetApiServiceConsumeInfoReq struct {
	param_base.BasicParam
	PageNumber        int   `json:"page_number" in:"query"`
	PageSize          int   `json:"page_size" in:"query"`
	TimeType          int   `json:"time_type" in:"query" description:"0 今日 1 昨日 2 本周 3 本月"`
	TodayEndTimestamp int64 `json:"today_end_timestamp" in:"query"`
}

type ApiServiceConsumeData struct {
	Infos      []gd_statistics.ApiServiceConsumeInfo `json:"infos"`
	Total      int64                                  `json:"total"`
	PageNumber int                                    `json:"page_number" in:"query"`
	PageSize   int                                    `json:"page_size" in:"query"`
}

type BiGetApiServiceConsumeInfoResp struct {
	param_base.SimpleResp
	Data ApiServiceConsumeData `json:"data"`
}

type BiGetApiServiceIncomeInfoReq struct {
	param_base.BasicParam
	PageNumber        int   `json:"page_number" in:"query"`
	PageSize          int   `json:"page_size" in:"query"`
	TimeType          int   `json:"time_type" description:"0 今日 1 昨日 2 本周 3 本月" in:"query"`
	TodayEndTimestamp int64 `json:"today_end_timestamp" in:"query"`
}

type ApiServiceIncomeData struct {
	Infos      []gd_statistics.ApiServiceIncomeInfo `json:"infos"`
	Total      int64                                 `json:"total"`
	PageNumber int                                   `json:"page_number" in:"query"`
	PageSize   int                                   `json:"page_size" in:"query"`
}

type BiGetApiServiceIncomeInfoResp struct {
	param_base.SimpleResp
	Data ApiServiceIncomeData `json:"data"`
}

type BiGetApiServiceFailInfoReq struct {
	param_base.BasicParam
	PageNumber        int   `json:"page_number" in:"query"`
	PageSize          int   `json:"page_size" in:"query"`
	TimeType          int   `json:"time_type" in:"query" description:"0 今日 1 昨日 2 本周 3 本月"`
	TodayEndTimestamp int64 `json:"today_end_timestamp" in:"query"`
}

type ApiServiceFailData struct {
	Infos      []gd_statistics.ApiServiceFailInfo `json:"infos"`
	Total      int64                               `json:"total"`
	PageNumber int                                 `json:"page_number" in:"query"`
	PageSize   int                                 `json:"page_size" in:"query"`
}

type BiGetApiServiceFailInfoResp struct {
	param_base.SimpleResp
	Data ApiServiceFailData `json:"data"`
}

type BiGetProviderServiceDataInfoReq struct {
	param_base.BasicParam
	ProviderApiId     int64 `json:"provider_api_id" in:"query"`
	TodayEndTimestamp int64 `json:"today_end_timestamp" in:"query"`
}

type BiGetProviderServiceDataInfoResp struct {
	param_base.SimpleResp
	Info gd_statistics.ProviderServiceAllDataInfo `json:"data"`
}

type BiGetProviderServicePayInfoReq struct {
	param_base.BasicParam
	PageNumber        int   `json:"page_number" in:"query"`
	PageSize          int   `json:"page_size" in:"query"`
	TimeType          int   `json:"time_type" in:"query" description:"0 今日 1 昨日 2 本周 3 本月"`
	TodayEndTimestamp int64 `json:"today_end_timestamp" in:"query"`
}

type ProviderServicePayData struct {
	Infos      []gd_statistics.ProviderServicePayInfo `json:"infos"`
	Total      int64                                   `json:"total"`
	PageNumber int                                     `json:"page_number"`
	PageSize   int                                     `json:"page_size"`
}

type BiGetProviderServicePayInfoResp struct {
	param_base.SimpleResp
	Data ProviderServicePayData `json:"data"`
}

type BiGetProviderServiceFailInfoReq struct {
	param_base.BasicParam
	PageNumber        int   `json:"page_number" in:"query"`
	PageSize          int   `json:"page_size" in:"query"`
	TimeType          int   `json:"time_type" in:"query" description:"0 今日 1 昨日 2 本周 3 本月"`
	TodayEndTimestamp int64 `json:"today_end_timestamp" in:"query"`
}

type ProviderServiceFailData struct {
	Infos      []gd_statistics.ProviderServiceFailInfo `json:"infos"`
	Total      int64                                    `json:"total"`
	PageNumber int                                      `json:"page_number"`
	PageSize   int                                      `json:"page_size"`
}

type BiGetProviderServiceFailInfoResp struct {
	param_base.SimpleResp
	Data ProviderServiceFailData `json:"data"`
}

type BiGetPayDistributionReq struct {
	param_base.BasicParam
	ApiId             string `json:"api_id" in:"query"`
	MerchantId        int64  `json:"merchant_id" in:"query"`
	StartTimestamp    int64  `json:"start_timestamp" in:"query"`
	EndTimestamp      int64  `json:"end_timestamp" in:"query"`
	TodayEndTimestamp int64  `json:"today_end_timestamp" in:"query"`
}

type PayDistributinData struct {
	MerchantSumCharge int64                          `json:"merchant_sum_charge"`
	ProviderSumCharge int64                          `json:"provider_sum_charge"`
	Infos             []gd_statistics.ProviderCount `json:"infos"`
}

type BiGetPayDistributionResp struct {
	param_base.SimpleResp
	Data PayDistributinData `json:"data"`
}
