Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.scheduler.dao.entities;
- import javax.persistence.*;
- import java.util.List;
- @Entity
- public class User extends AbstractEntity{
- @Column(nullable = false)
- String username;
- @Column(nullable = false)
- String password;
- @Column(nullable = false)
- Boolean enabled;
- @Column
- String avatarPath;
- @Column
- String verifyUuid;
- @Column
- Long storeId;
- @ElementCollection
- @CollectionTable(name = "user_authorities", joinColumns = @JoinColumn(name = "user_id"))
- @Column(name = "authorities")
- List<String> authorities;
- @ManyToMany(cascade = CascadeType.PERSIST)
- List<Account> accounts;
- @OneToMany(cascade = CascadeType.ALL)
- List<Post> posts;
- @OneToMany(cascade = CascadeType.ALL)
- List<Event> events;
- @OneToMany(cascade = CascadeType.ALL)
- List<Media> mediaList;
- @OneToMany(cascade = CascadeType.ALL)
- List<News> newsList;
- public User() {
- }
- public User(String username,
- String password,
- Boolean enabled,
- String avatarPath,
- Long storeId,
- List<String> authorities,
- List<Account> accounts,
- List<Post> posts,
- List<Event> events,
- List<Media> mediaList,
- List<News> newsList) {
- this.username = username;
- this.password = password;
- this.enabled = enabled;
- this.avatarPath = avatarPath;
- this.storeId = storeId;
- this.authorities = authorities;
- this.accounts = accounts;
- this.posts = posts;
- this.events = events;
- this.mediaList = mediaList;
- this.newsList = newsList;
- }
- public String getAvatarPath() {
- return avatarPath;
- }
- public void setAvatarPath(String avatarPath) {
- this.avatarPath = avatarPath;
- }
- public String getUsername() {
- return username;
- }
- public void setUsername(String username) {
- this.username = username;
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
- public Boolean getEnabled() {
- return enabled;
- }
- public void setEnabled(Boolean enabled) {
- this.enabled = enabled;
- }
- public String getVerifyUuid() {
- return verifyUuid;
- }
- public void setVerifyUuid(String verifyUuid) {
- this.verifyUuid = verifyUuid;
- }
- public Long getStoreId() {
- return storeId;
- }
- public void setStoreId(Long storeId) {
- this.storeId = storeId;
- }
- public List<String> getAuthorities() {
- return authorities;
- }
- public void setAuthorities(List<String> authorities) {
- this.authorities = authorities;
- }
- public List<Account> getAccounts() {
- return accounts;
- }
- public void setAccounts(List<Account> accounts) {
- this.accounts = accounts;
- }
- public List<Post> getPosts() {
- return posts;
- }
- public void setPosts(List<Post> posts) {
- this.posts = posts;
- }
- public List<Event> getEvents() {
- return events;
- }
- public void setEvents(List<Event> events) {
- this.events = events;
- }
- public List<Media> getMediaList() {
- return mediaList;
- }
- public void setMediaList(List<Media> mediaList) {
- this.mediaList = mediaList;
- }
- public List<News> getNewsList() {
- return newsList;
- }
- public void setNewsList(List<News> newsList) {
- this.newsList = newsList;
- }
- }
Add Comment
Please, Sign In to add comment