package com.agileboot.domain.collaboration.record.command;

import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.util.Date;
import javax.validation.constraints.PositiveOrZero;
import javax.validation.constraints.Size;
import lombok.Data;

/**
 * @author codex
 */
@Data
public class CollaborationExpenditureCommand {

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date spendDate;

    @PositiveOrZero(message = "支出金额不能小于0")
    private BigDecimal amount;

    @Size(max = 30, message = "支出用途长度不能超过30个字符")
    private String purpose;

}
