package dto

type DataAppLogEntry struct {
	RequestID       string `json:"request_id"`
	TraceID         string `json:"trace_id"`
	DateTime        int64  `json:"date_time"`
	Type            string `json:"type"`
	Status          string `json:"status"`
	EndpointName    string `json:"endpoint_name"`
	ResponseTime    string `json:"response_time"`
	ResponseSize    string `json:"response_size"`
	ResponseBody    string `json:"response_body"`
	QueryParam      string `json:"query_param"`
	ReqHeader       string `json:"req_header"`
	ReqBody         string `json:"req_body"`
	ReqUrl          string `json:"req_url"`
	ClientInfo      string `json:"client_info"`
	HttpCode        int    `json:"http_code"`
	HttpCodeMessage string `json:"http_code_message"`
	RspRowCnt       int    `json:"resp_row_count"`
	RspCached       bool   `json:"rsp_cached"`
	Method          string `json:"method"`
	EndpointId      string `json:"endpoint_id"`
}

type GetDataAppLogRes struct {
	BasicRes
	Logs     []*DataAppLogEntry `json:"logs"`
	Passback string             `json:"passback"`
	HasMore  bool               `json:"has_more"`
}

type GetLogResponseBodySwitchRes struct {
	BasicRes
	// Enum: [on off]
	SwtichStatus string `json:"swtich_status"`
}

type SubmitDownloadDataAPPLogTaskRes struct {
	BasicRes
	TaskID string `json:"task_id"`
}

type DownloadDataAPPLogTaskStatusRes struct {
	BasicRes
	// Enum: [processing failed success]
	Status string `json:"status"`
	// only availiable when status is sucess
	DownloadURL string `json:"download_url"`
}
