package cn.estsh.i3plus.ext.mes.pojo.bean;

import cn.estsh.i3plus.ext.mes.pojo.util.MesExtEnumUtil;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @PROJECT_NAME: i3plus-mes-panasonic-bu
 * @DESCRIPTION: 字段履历配置表-作用1：修改基础表字段时根据该表判断是否记录字段修改履历
 * @USER: xinwang.yi
 * @DATE: 2022-07-07 16:06
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_TRAVEL_MENU_FIELD_CONFIG")
@Api("MES_履历菜单字段配置表")
public class MesTravelMenuFieldConfig extends BaseBean implements Serializable {

    private static final long serialVersionUID = -3971516351561971518L;

    @Column(name = "MENU_CODE")
    @ApiParam("菜单代码")
    @AnnoOutputColumn(refClass = MesExtEnumUtil.FIELD_MENU_TYPE.class, refForeignKey = "value", value = "description")
    private Integer menuCode;

    @Column(name = "FIELD_CODE")
    @ApiParam("字段代码")
    private String fieldCode;

    @Column(name = "FIELD_NAME")
    @ApiParam("字段名称")
    private String fieldName;

    @Column(name = "FIELD_ENUM_CLAZZ")
    @ApiParam("字段枚举转换类")
    private String fieldEnumClazz;
}
