| 1 | |
package com.ctrip.framework.apollo.portal.entity.po; |
| 2 | |
|
| 3 | |
import com.ctrip.framework.apollo.common.entity.BaseEntity; |
| 4 | |
|
| 5 | |
import org.hibernate.annotations.SQLDelete; |
| 6 | |
import org.hibernate.annotations.Where; |
| 7 | |
|
| 8 | |
import javax.persistence.Column; |
| 9 | |
import javax.persistence.Entity; |
| 10 | |
import javax.persistence.Table; |
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
@Entity |
| 16 | |
@Table(name = "UserRole") |
| 17 | |
@SQLDelete(sql = "Update UserRole set isDeleted = 1 where id = ?") |
| 18 | |
@Where(clause = "isDeleted = 0") |
| 19 | 19 | public class UserRole extends BaseEntity { |
| 20 | |
@Column(name = "UserId", nullable = false) |
| 21 | |
private String userId; |
| 22 | |
|
| 23 | |
@Column(name = "RoleId", nullable = false) |
| 24 | |
private long roleId; |
| 25 | |
|
| 26 | |
public String getUserId() { |
| 27 | 8 | return userId; |
| 28 | |
} |
| 29 | |
|
| 30 | |
public void setUserId(String userId) { |
| 31 | 2 | this.userId = userId; |
| 32 | 2 | } |
| 33 | |
|
| 34 | |
public long getRoleId() { |
| 35 | 4 | return roleId; |
| 36 | |
} |
| 37 | |
|
| 38 | |
public void setRoleId(long roleId) { |
| 39 | 2 | this.roleId = roleId; |
| 40 | 2 | } |
| 41 | |
} |