package com.neusoft.smart.pos.dto.member.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel(value = "会员交易请求对象")
public class MemberTransactionRequest {
	
	private Integer memberTransactionId;
	
	@NotEmpty(message = "会员卡号不可为空")
	@ApiModelProperty(name = "cardNum", value = "会员卡号", dataType = "Integer", example = "123546798", required = true)
	private String cardNum;
	
	@ApiModelProperty(name = "password", value = "会员卡密码", dataType = "String", example = "123546798", required = true)
	private String cardPassword;
	
	@NotEmpty(message = "订单编号不可为空")
	@ApiModelProperty(name = "transactionOrder", value = "订单编号", dataType = "String", example = "xxxxxxxxxx", required = true)
	private String transactionOrderNo;
	
	@NotNull(message = "交易金额不可为空")
	@DecimalMax(value = "999999999.99", message = "交易金额不可大于999999999.99")
	@ApiModelProperty(name = "transactionAmount", value = "交易金额", dataType = "BigDecimal", example = "123.21", required = true)
	private BigDecimal transactionAmount;
	
	private Integer transactionNum;
	
	@NotNull(message = "交易支付方式不可为空")
	@ApiModelProperty(name = "transactionMode", value = "交易支付方式", dataType = "Integer", example = "2", required = true)
	private Integer transactionMode;
	
	private String transactionUser;
	
	@NotNull(message = "交易时间不可为空")
	@ApiModelProperty(name = "transactionTime", value = "交易时间", dataType = "Date", example = "2018-04-16 15:20:32", required = true)
	private Date transactionTime;
	
	private Boolean canBeNegative = false;
	
}