package requestmapping

import (
	"PaymentCenter/app/constants/common"
	"PaymentCenter/app/http/entities/front"
)

var FrontRequestMap = map[string]func() (validForm interface{}, isSaveLog bool){
	common.FRONT_V1 + "/pay/url":    func() (interface{}, bool) { return new(front.PayReqs), true },
	common.FRONT_V1 + "/pay/refund": func() (interface{}, bool) { return new(front.RefundReqs), true },
	common.FRONT_V1 + "/pay/query":  func() (interface{}, bool) { return new(front.QueryReqs), false },
	common.FRONT_V1 + "/pay/close":  func() (interface{}, bool) { return new(front.CloseReqs), true },
}

var FrontRequestMapBeforeDecrypt = map[string]func() interface{}{

	common.FRONT_V1 + "/pay/url":    func() interface{} { return new(front.RequestBody) },
	common.FRONT_V1 + "/pay/refund": func() interface{} { return new(front.RequestBody) },
	common.FRONT_V1 + "/pay/query":  func() interface{} { return new(front.RequestBody) },
	common.FRONT_V1 + "/pay/close":  func() interface{} { return new(front.CloseReqs) },
}