package cn.wisenergy.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @description: 用户的项目工时统计
 * @author: nh
 * @create: 2021-02-03 15:45
 **/
@Data
@ApiModel(value = "UserWorkTimeStatisticsByProject",description = "用户参与正在进行的项目工时统计")
public class UserWorkTimeStatisticsByProject implements Serializable{

    private static final long serialVersionUID = -4059589583836766681L;

    /**
     *  用户主键
     */
    @ApiModelProperty(name = "userId",value = "用户主键")

    private Integer userId;

    /**
     *  用户名
     */
    @ApiModelProperty(name = "userName", value = "用户名")
    private String userName;

    /**
     * 总工时
     */
    @ApiModelProperty(name = "totalTime", value = "总工时")
    private Integer totalTime;

    /**
     *  项目工时列表
     */
    @ApiModelProperty(name = "projectWorkTimeAndType", value = "项目工时列表")
    private List<ProjectWorkTimeAndType> projectWorkTimeAndType;



    @Override
    public boolean equals(Object obj) {
        UserWorkTimeStatisticsByProject other = (UserWorkTimeStatisticsByProject) obj;
        if (this == obj) {
            return true;
        }
        if (this.userId.equals(other.userId)) {
            return true;
        }
        return false;
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }
}

