package org.fouram.entity;

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

import org.apache.ibatis.type.Alias;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Alias(value = "SapUser")
public class SapUser implements Serializable {
	private static final long serialVersionUID = 1L;

	private String userId;
	private String personId;
	private String avatar;
	// 邮箱
	private String username;
	// 姓名
	private String name;
	private String firstOrgId;
	private String secondOrgId;
	private String thirdOrgId;
	private String fourthOrgId;
	private String firstOrgName;
	private String secondOrgName;
	private String thirdOrgName;
	private String fourthOrgName;
	private Long firstOrgWxDepartId;
	private Long secondOrgWxDepartId;
	private Long thirdOrgWxDepartId;
	private Long fourthOrgWxDepartId;
	private String position;
	private String formatPosition;
	private String mobile;
	// 手机
	private String formatMobile;
	private String businessPhone;
	// 座机
	private String formatBusinessPhone;
	private String gender;
	private String email;
	private String formatEmail;
	private Boolean isPrimary;
	private String result;
	private Integer delFlag;
	private Date createDate;
	private Integer sortNumber;

	private List<List<SapOrg>> departList;

	public String toCompareString() {
		StringBuilder sBuilder = new StringBuilder();
		sBuilder.append(userId).append(personId).append(username).append(name).append(firstOrgName).append(firstOrgId)
				.append(firstOrgWxDepartId).append(secondOrgName).append(secondOrgId).append(secondOrgWxDepartId)
				.append(thirdOrgName).append(thirdOrgId).append(thirdOrgWxDepartId).append(fourthOrgName)
				.append(fourthOrgId).append(fourthOrgWxDepartId).append(position).append(mobile).append(businessPhone)
				.append(gender).append(email).append(isPrimary);
		return sBuilder.toString();
	}
}
