package com.cool.store.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.Length;

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

@Data
public class AdjustmentOrderRequest implements Serializable {

    @ApiModelProperty("主键ID（编辑时必填）")
    private Long id;

    @ApiModelProperty("门店ID")
    @NotBlank(message = "门店ID不能为空")
    private String storeId;

    @ApiModelProperty("业务类型")
    private String businessTypeCode;

    @ApiModelProperty("费用类型（装修类/采购设备类/设备类）")
    @NotBlank(message = "费用类型不能为空")
    private String expenseTypeCode;

    @ApiModelProperty("调整类型（1-调增 2-调减）")
    private Integer adjustType;

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

    @ApiModelProperty("调整原因")
    @Length(max = 255, message = "调整原因长度不能超过255")
    private String adjustReason;

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

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

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

    @ApiModelProperty("费用单类型 1-费用单 2-调整单")
    @NotNull(message = "费用单类型不能为空")
    private Integer expenseSheetType;
}
