package cn.estsh.i3plus.pojo.mdm.bean.base;

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;

/**
 * @Description : MDM业务基础bean
 * @Reference :
 * @Author : yunhao
 * @CreateDate : 2020-05-12 17:30
 * @Modify:
 **/
@Data
@MappedSuperclass
@ApiModel("MDM业务基础bean")
public class BaseMdmBusiExtdBean extends BaseMdmBean {

    private static final long serialVersionUID = 4267453020130810967L;

    @Transient
    @ApiModelProperty("是否主数据")
    @AnnoOutputColumn(refClass = CommonEnumUtil.TRUE_OR_FALSE.class,hidden = true)
    public static Integer isMdmMaster  = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue();

    @Transient
    @ApiModelProperty("主数据Class")
    @AnnoOutputColumn(hidden = true)
    protected static Class<BaseMdmBean> mdmMasterClass  = BaseMdmBean.class;

    @Transient
    @ApiModelProperty("软件模块")
    @AnnoOutputColumn(refClass = CommonEnumUtil.SOFT_TYPE.class,hidden = true)
    protected static Integer mdmSoftType;

    @Column(name = "MDM_MASTER_ID")
    @ApiModelProperty("主数据id")
    @JsonSerialize(using = ToStringSerializer.class)
    public Long mdmMasterId;

}
