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

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

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

    private Long recordId;

    private String brand;

    private String goods;

    private String cooperationPlatform;

    private Integer imageReturnNum;

    private String retainedMethod;

    private String cooperatedMethod;

    private String purchaseMethod;

    private BigDecimal purchasePrice;

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

    private String purchasePlatform;

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

    private BigDecimal remuneration;

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

    private String requirements;

    private String remark;

    private Long creatorId;

    private String creatorName;

    private Integer tasksNum;

    private Integer completedTasksNum;

    private SettlementStatusDTO purchaseSettlementStatus;

    private SettlementStatusDTO deliverySettlementStatus;

    private SettlementStatusDTO remunerationSettlementStatus;

    private Date createTime;

}
