package com.cool.store.request;

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

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 生成分账单请求
 */
@Data
public class GenerateSplitOrderRequest implements Serializable {

    @ApiModelProperty("调整单ID")
    @NotNull(message = "费用单ID")
    private Long id;

    @ApiModelProperty("收款公司名称")
    @NotBlank(message = "收款公司不能为空")
    @Length(max = 100, message = "收款公司名称长度不能超过100")
    private String payeeAccountName;

    @ApiModelProperty("收款账户")
    @Length(max = 128, message = "收款账户长度不能超过128")
    private String payeeAccountNo;

    @ApiModelProperty("分账金额")
    @NotNull(message = "分账金额不能为空")
    @DecimalMin(value = "0.01", message = "分账金额必须大于0")
    private BigDecimal splitAmount;

    @ApiModelProperty("附件信息")
    private String attachmentInfo;

    @ApiModelProperty("备注")
    @Length(max = 255, message = "备注长度不能超过255")
    private String remark;
}
