package com.engine.recruit.entity.message;

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

/**
 * @author:dxfeng
 * @createTime: 2024/10/16
 * @version: 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class PositionField {
    private String id;
    private String fieldName;
    private String type;
    private String msgType;

    public String getMsgType() {
        String fieldMsgType = "";
        switch (type) {
            // 人员
            case "1":
            case "17":
                fieldMsgType = "user";
                break;
            // 分部
            case "164":
            case "169":
            case "170":
            case "194":
                fieldMsgType = "company";
                break;
            // 部门
            case "4":
            case "57":
            case "167":
            case "168":
                fieldMsgType = "department";
                break;
            // 角色
            case "267":
            case "65":
                fieldMsgType = "role";
                break;
            // 岗位
            case "24":
            case "278":
                fieldMsgType = "job";
                break;
            default:
                break;
        }
        return fieldMsgType;
    }
}
