package cn.estsh.i3plus.pojo.aps.common;

import cn.estsh.i3plus.pojo.aps.annotation.ExcludeImportExport;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.annotation.MainKey;
import cn.estsh.i3plus.pojo.aps.validator.InsertGroup;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * @Description :含有编码，名字的基类
 * @Reference :
 * @Author : jason.niu
 * @CreateDate : 2019-09-12
 * @Modify:
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@MappedSuperclass
@MainKey(groups = {InsertGroup.class})
@ExcludeImportExport
public abstract class BaseCode extends BaseAPS {
    @Column(name="CODE")
    @ApiParam(value ="编码")
    @FieldAnnotation(popSearch = true, mainkey = true)
    private String code;

    @Column(name="NAME")
    @ApiParam(value ="名称")
    @FieldAnnotation(popSearch = true)
    private String name;
}
