User增加RBAC角色
This commit is contained in:
parent
0c7e5753f4
commit
c53eeeef38
@ -1,5 +1,6 @@
|
|||||||
package com.example.springdemo.entities;
|
package com.example.springdemo.entities;
|
||||||
|
|
||||||
|
import com.example.springdemo.entities.RBAC.Roles;
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
@ -28,4 +29,9 @@ public class Users {
|
|||||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "user")
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "user")
|
||||||
@Column(name = "ordersID")
|
@Column(name = "ordersID")
|
||||||
private List<Orders> orders;//订单
|
private List<Orders> orders;//订单
|
||||||
|
|
||||||
|
@ManyToOne(cascade = CascadeType.ALL)
|
||||||
|
@JoinColumn(name = "rolesID", referencedColumnName = "id")
|
||||||
|
@Column(name = "rolesID")
|
||||||
|
private Roles roles;//RBAC角色
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user