package cn.estsh.i3plus.pojo.andon.bean;


import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
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 javax.persistence.Transient;
import java.io.Serializable;
import java.util.List;

/**
 * @Description :生产区域
 * @Reference :
 * @Author : jack.jia
 * @CreateDate : 2019-04-02
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_AREA")
@Api("生产区域")
public class MesArea extends BaseBean implements Serializable {

    private static final long serialVersionUID = -6011431901401687892L;

    @Column(name="AREA_CODE")
    @ApiParam("区域代码")
    private String areaCode;

    @Column(name="AREA_NAME")
    @ApiParam("区域名称")
    private String areaName;

    @Transient
    @ApiParam(value ="子集列表")
    @AnnoOutputColumn(hidden = true)
    private List<MesWorkCenter> childTreeList;

    @Transient
    @ApiParam(value ="名称")
    @AnnoOutputColumn(hidden = true)
    private String name;

    public String getName(){
        return areaName;
    }
}
