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

import cn.hutool.core.bean.BeanUtil;
import com.agileboot.domain.collaboration.record.db.CollaborationExpenditureEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author codex
 */
@NoArgsConstructor
@Data
public class CollaborationExpenditureDTO {

    public CollaborationExpenditureDTO(CollaborationExpenditureEntity entity) {
        if (entity != null) {
            BeanUtil.copyProperties(entity, this);
        }
    }

    private Long expenditureId;

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

    private BigDecimal amount;

    private String purpose;

}
