fire_point/src/main/java/com/xkrs/model/entity/RelUserRoleEntity.java

61 lines
1.3 KiB
Java

package com.xkrs.model.entity;
import javax.persistence.*;
import java.io.Serializable;
/**
* RelUserRole 表实体类
* @author tajochen
*/
@Entity
@Table(name="rel_user_role")
public class RelUserRoleEntity implements Serializable {
/**
* 指定主键,建立自增序列,主键值取自序列
*/
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "rel_user_role_seq_gen")
@SequenceGenerator(name = "rel_user_role_seq_gen", sequenceName = "rel_user_role_id_seq",allocationSize = 1)
private Integer id;
@Column(nullable = false)
private Long userId;
@Column(nullable = false)
private Integer roleId;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Integer getRoleId() {
return roleId;
}
public void setRoleId(Integer roleId) {
this.roleId = roleId;
}
@Override
public String toString() {
return "RelUserRoleEntity{" +
"id=" + id +
", userId=" + userId +
", roleId=" + roleId +
'}';
}
}