forked from Infosys/Discourse-Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGroupUsers.java
More file actions
154 lines (122 loc) · 3.58 KB
/
Copy pathGroupUsers.java
File metadata and controls
154 lines (122 loc) · 3.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/*
* Copyright 2021 Infosys Ltd.
* Use of this source code is governed by GNU General Public License version 2
* that can be found in the LICENSE file or at
* https://opensource.org/licenses/GPL-2.0
*/
package com.infy.domain;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.time.Instant;
/**
* A GroupUsers.
*/
@Entity
@Table(name = "group_users")
public class GroupUsers extends AbstractAuditingEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
@SequenceGenerator(name = "sequenceGenerator")
private Long id;
@NotNull
@Column(name = "group_id", nullable = false)
private Long groupId;
@NotNull
@Column(name = "user_id", nullable = false)
private String userId;
@NotNull
@Column(name = "owner", nullable = false)
private Boolean owner;
@NotNull
@Column(name = "notification_level", nullable = false)
private Integer notificationLevel;
@NotNull
@Column(name = "first_unread_pm_at", nullable = false)
private Instant firstUnreadPmAt;
// jhipster-needle-entity-add-field - JHipster will add fields here
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getGroupId() {
return groupId;
}
public GroupUsers groupId(Long groupId) {
this.groupId = groupId;
return this;
}
public void setGroupId(Long groupId) {
this.groupId = groupId;
}
public String getUserId() {
return userId;
}
public GroupUsers userId(String userId) {
this.userId = userId;
return this;
}
public void setUserId(String userId) {
this.userId = userId;
}
public Boolean isOwner() {
return owner;
}
public GroupUsers owner(Boolean owner) {
this.owner = owner;
return this;
}
public void setOwner(Boolean owner) {
this.owner = owner;
}
public Integer getNotificationLevel() {
return notificationLevel;
}
public GroupUsers notificationLevel(Integer notificationLevel) {
this.notificationLevel = notificationLevel;
return this;
}
public void setNotificationLevel(Integer notificationLevel) {
this.notificationLevel = notificationLevel;
}
public Instant getFirstUnreadPmAt() {
return firstUnreadPmAt;
}
public GroupUsers firstUnreadPmAt(Instant firstUnreadPmAt) {
this.firstUnreadPmAt = firstUnreadPmAt;
return this;
}
public void setFirstUnreadPmAt(Instant firstUnreadPmAt) {
this.firstUnreadPmAt = firstUnreadPmAt;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof GroupUsers)) {
return false;
}
return id != null && id.equals(((GroupUsers) o).id);
}
@Override
public int hashCode() {
return 31;
}
// prettier-ignore
@Override
public String toString() {
return "GroupUsers{" +
"id=" + getId() +
", groupId=" + getGroupId() +
", userId='" + getUserId() + "'" +
", owner='" + isOwner() + "'" +
", notificationLevel=" + getNotificationLevel() +
", firstUnreadPmAt='" + getFirstUnreadPmAt() + "'" +
"}";
}
}