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

import cn.hutool.core.bean.BeanUtil;
import com.agileboot.domain.collaboration.record.db.CollaborationSettlementEntity;
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 CollaborationSettlementDTO {

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

    private Long settlementId;

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

    private String method;

    private BigDecimal income;

    private String purpose;

}
