blob: 5c0d6af927d4967ecc63924179644b374cea94c2 (
plain)
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
|
package files.entity;
import com.pengrad.telegrambot.model.User;
import javax.persistence.Entity;
import javax.persistence.Id;
@Entity
public class TelegramUser {
@Id
private static Long id;
private static String username;
private static Boolean isBot;
private static String fullName;
private static String date;
public TelegramUser() {}
public TelegramUser(long id, String username, boolean isBot, String fullName, String date) {
this.id = id;
this.username = username;
this.isBot = isBot;
this.fullName = fullName;
this.date = date;
}
public static String checkIfHasLastName(User user) {
String lastName = user.lastName();
return (lastName != null) ? (" " + lastName) : ("");
}
public static Long getId() {
return id;
}
public static String getUsername() {
return username;
}
public static String getFullName() {
return fullName;
}
}
|