package api type OrdersResp struct { OrderNo int64 `json:"order_no"` OrderType int `json:"order_type"` OutTreadNo string `json:"out_tread_no"` Amount int `json:"amount"` Desc string `json:"desc"` Status int `json:"status"` CreateTime string `json:"create_time"` } type OrdersWithUrl struct { Order *OrdersResp Url string } func (o *OrdersResp) WithUrl(url string) *OrdersWithUrl { return &OrdersWithUrl{ Order: o, Url: url, } } func (o *OrdersResp) WithAes(url string) *OrdersWithUrl { return &OrdersWithUrl{ Order: o, Url: url, } }