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;

/**
 * @author zcf
 * @date 2018-04-08 10：43
 * @description 充值订单保存使用Response
 */
@ApiModel
@Data
@NoArgsConstructor
public class PostRechargeOrderResponse {

	@ApiModelProperty(name = "memberCardNo", value = "会员卡号", dataType = "String" ,example="21212005")
	private String memberCardNo;

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

	@ApiModelProperty(name = "orderAmount", value = "订单应付金额", dataType = "BigDecimal" ,example="20.99")
	public BigDecimal orderAmount;

	@ApiModelProperty(name = "realPayAmount", value = "订单实付金额", dataType = "BigDecimal" ,example="0.00")
	public BigDecimal realPayAmount;

	@ApiModelProperty(name = "discountAmount", value = "订单优惠金额", dataType = "BigDecimal" ,example="0.00")
	public BigDecimal discountAmount;

	@ApiModelProperty(name = "createdAt", value = "创建时间", dataType = "String" ,example="2018-05-26 18:55:45")
	public String createdAt;

	public void setCreatedAt(Date createdAt) {
		this.createdAt = LocalDateTimeUtils.convertLocalDateTimeToString(LocalDateTimeUtils.convertDateToLocalDateTime(createdAt),LocalDateTimeUtils.DEFAULT_DATETIME_FORMAT);
	}

}
