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

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;

/**
 * @Description : 关系-用户岗位
 * @Reference   :
 * @Author      : wei.peng
 * @Date        : 2018-10-22 16:58:43.341
 * @Modify      :
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="SYS_REF_USER_POSITION")
@Api(value="关系-用户岗位",description = "关系-用户岗位")
public class SysRefUserPosition extends BaseBean {

    private static final long serialVersionUID = 3234085587521697199L;
    @Column(name="USER_ID")
    @ApiParam(value ="用户ID" , example = "-1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    @Column(name="USER_NAME_RDD")
    @ApiParam(value ="用户名称")
    private String userNameRdd;

    @Column(name="POSITION_ID")
    @ApiParam(value ="岗位ID" , example = "-1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long positionId;

    @Column(name="POSITION_NAME_RDD")
    @ApiParam(value ="岗位名称")
    private String positionNameRdd;

    public SysRefUserPosition() {
    }

    public SysRefUserPosition(Long userId,String userNameRdd, Long positionId, String positionNameRdd) {
        this.userId = userId;
        this.userNameRdd = userNameRdd;
        this.positionId = positionId;
        this.positionNameRdd = positionNameRdd;
    }
}
