package com.neusoft.smart.pos.dto.trade.response;

import com.neusoft.smart.pos.framework.utils.LocalDateTimeUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author zcf
 * @date 2018-11-28 10：43
 * @description 资金预授权订单详情使用Response
 */
@ApiModel
@Data
@NoArgsConstructor
public class GetGrantOrderTransactionResponse {
	
	@ApiModelProperty(name = "grantOrderNumber", value = "授权订单编号", dataType = "String" ,example="810825487965")
	public String grantOrderNumber;
	
	@ApiModelProperty(name = "operationType", value = "操作类型@1:预授权申请@2:授权成功@3:解冻@4:撤销@5:授权转支付@6:退款", dataType = "String" ,example="1")
	public String operationType;
	
	@ApiModelProperty(name = "operationAmount", value = "操作金额", dataType = "BigDecimal" ,example="20.99")
	public BigDecimal operationAmount;
	
	@ApiModelProperty(name = "operationName", value = "操作名称", dataType = "String" ,example="3")
	public String operationName;
	
	@ApiModelProperty(name = "operationTime", value = "创建时间", dataType = "String" ,example="2018-05-26 18:55:45")
	public String operationTime;
	
	public void setOperationTime(Date operationTime) {
		this.operationTime = LocalDateTimeUtils.convertLocalDateTimeToString(LocalDateTimeUtils.convertDateToLocalDateTime(operationTime),LocalDateTimeUtils.DEFAULT_DATETIME_FORMAT);
	}
	
}
