package com.neusoft.smart.pos.dto.card.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 CardTradeCreateRequest {

	@ApiModelProperty(name = "sourceCardNum", value = "支付方卡号", dataType = "String", example = "123546798")
	private String sourceCardNum;

	@ApiModelProperty(name = "sourceCardAnotherId", value = "支付方卡Id2", dataType = "String", example = "221654")
	private String sourceCardAnotherId;

	@ApiModelProperty(name = "sourceCardOtherId", value = "支付方卡其他ID", dataType = "String", example = "123546798")
	private String sourceCardOtherId;
	
	@ApiModelProperty(name = "password", value = "支付方卡密码", dataType = "String", example = "123546798")
	private String cardPassword;

    @ApiModelProperty(name = "targetCardNum", value = "卖方卡号", dataType = "String", example = "123546798")
    private String targetCardNum;

    @ApiModelProperty(name = "targetCardAnotherId", value = "卖方会员Id", dataType = "String", example = "289753")
    private String targetCardAnotherId;

    @ApiModelProperty(name = "targetCardOtherId", value = "卖方卡其他ID", dataType = "String", example = "123546798")
    private String targetCardOtherId;
	
	@NotEmpty(message = "支付单编号不可为空")
	@ApiModelProperty(name = "outTradeId", value = "支付单编号", dataType = "String", example = "xxxxxxxxxx", required = true)
	private String outTradeId;
	
	@NotNull(message = "交易金额不可为空")
	@DecimalMax(value = "999999999", message = "交易金额不可大于999999999")
	@ApiModelProperty(name = "payAmount", value = "交易金额(单位分)", dataType = "Long", example = "123", required = true)
	private Long payAmount;

	@NotNull(message = "扣款方式不可为空 @1：卡内余额支付 @2：积分支付")
	@ApiModelProperty(name = "payType", value = "扣款方式", dataType = "String", example = "1", required = true)
	private String payType;
	
	private Boolean canBeNegative = false;
	
}