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

import com.neusoft.smart.pos.constants.DictionaryConstant;
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;

/**
 * @author zcf
 * @date 2018-12-04 10：43
 * @description 资金预授权授权状态查询使用Response
 */
@ApiModel
@Data
@NoArgsConstructor
public class GetGrantOrderStatusResponse {

	@ApiModelProperty(name = "grantOrderNumber", value = "订单编号", dataType = "String" ,example="810825487965")
	public String grantOrderNumber;

	@ApiModelProperty(name = "grantStatus", value = "授权状态@1:未授权@2:已授权@3:已撤销", dataType = "String" ,example="1")
	public String grantStatus;
	
	@ApiModelProperty(name = "grantTime", value = "授权完成时间", dataType = "String" ,example="2018-07-09 09:40:53")
	public String grantTime = "";
	
	public void setGrantTime(Date grantTime) {
		if(null == grantTime){
			this.grantTime = "";
		}else{
			this.grantTime = LocalDateTimeUtils.convertLocalDateTimeToString(LocalDateTimeUtils.convertDateToLocalDateTime(grantTime),LocalDateTimeUtils.DEFAULT_DATETIME_FORMAT);
		}
	}
}
