mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 07:45:49 +00:00
Entidades creadas
This commit is contained in:
parent
8b13d4b2a5
commit
018195af62
1 changed files with 5 additions and 18 deletions
|
@ -1,31 +1,18 @@
|
|||
package org.springframework.cheapy.model;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
@Entity
|
||||
@Table(name = "authorities")
|
||||
public class Authorities extends BaseEntity {
|
||||
public class Authorities {
|
||||
|
||||
@Id
|
||||
String username;
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "username")
|
||||
User user;
|
||||
|
||||
@Size(min = 3, max = 50)
|
||||
String authority;
|
||||
|
||||
public User getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
public void setUser(User user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
public String getAuthority() {
|
||||
return authority;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue