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

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
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.Index;
import javax.persistence.Table;

/**
 * @Description : 用户登录记录
 * @Reference :
 * @Author : wei.peng
 * @Date : 2018-10-22 16:58:42.856
 * @Modify :
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "SYS_LOG_ROLE_CHANGE", indexes = {
        @Index(columnList = "CREATE_DATE_TIME")
})
@ApiModel(value = "用户角色更新记录表", description = "用户角色更新记录表")
public class SysLogRoleChange extends BaseBean {

    private static final long serialVersionUID = 4665598896654312569L;
    @Column(name = "USER_ID")
    @ApiModelProperty(value = "用户ID", access = "用户ID")
    @AnnoOutputColumn(hidden = true)
    private Long userId;

    @Column(name = "USER_NAME")
    @ApiModelProperty(value = "用户名", access = "用户名")
    private String userName;

    @Column(name = "PREVIOUS_ROLES",columnDefinition = "TEXT")
    @ApiModelProperty(value = "之前的角色", access = "之前的角色")
    private String previousRoles;

    @Column(name = "CURRENT_ROLES", columnDefinition = "TEXT")
    @ApiModelProperty(value = "当前的角色", access = "当前的角色")
    private String currentRoles;

}
