package com.hz.pm.api.expert.model.vo;

import com.hz.pm.api.common.model.entity.KeyValDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * <p>
 * ExpertPortraitVO
 * </p>
 *
 * @author WendyYang
 * @since 10:46 2023/12/19
 */
@Data
public class ExpertPortraitVO {

    @ApiModelProperty("收到邀请次数")
    private Integer receivedCount;

    @ApiModelProperty("确认参加次数")
    private Integer confirmedCount;

    @ApiModelProperty("迟到次数")
    private Integer beLateCount;

    @ApiModelProperty("早退次数")
    private Integer leaveEarlyCount;

    @ApiModelProperty("参与积极度")
    private Integer positivity;

    @ApiModelProperty("违规次数")
    private Integer violationCount;

    @ApiModelProperty("每月参会次数")
    private List<KeyValDTO<Integer, Long>> attendCountPerMonth;

    public static ExpertPortraitVO init() {
        ExpertPortraitVO portrait = new ExpertPortraitVO();
        portrait.setReceivedCount(0);
        portrait.setPositivity(0);
        portrait.setConfirmedCount(0);
        portrait.setBeLateCount(0);
        portrait.setViolationCount(0);
        portrait.setLeaveEarlyCount(0);
        return portrait;
    }

    public void incrBeLateCount() {
        this.beLateCount += 1;
    }

    public void incrLeaveEarlyCount() {
        this.leaveEarlyCount +=1;
    }

    public void incrViolationCount() {
        this.violationCount += 1;
    }

}
