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.417
 * @Modify      :
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="SYS_REF_USER_ROLE")
@Api(value="关系-用户角色",description = "关系-用户角色")
public class SysRefUserRole extends BaseBean {

    private static final long serialVersionUID = -2253689528880200360L;
    @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="ROLE_ID")
    @ApiParam(value ="角色ID" , example = "-1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long roleId;

    @Column(name="ROLE_NAME_RDD")
    @ApiParam(value ="角色名称")
    private String roleNameRdd;

    public SysRefUserRole() {
    }

    public SysRefUserRole(Long userId, Long roleId, String roleNameRdd) {
        this.userId = userId;
        this.roleId = roleId;
        this.roleNameRdd = roleNameRdd;
    }
}
