- tous les appels à printStackTrace() sont supprimés et remplacés par Log.severe() - Ajout de de l'historiqe de ping et de login kick - AbstractConfig et AbstractConfigManager maintenant dans PandacubeUtil pour être utilisé par tous les plugins (évite code en double) - Connexion MySQL supporte UTF-8 (mb4) - Correction de Quelques erreurs lorsqu'une table SQL n'est pas initialisée avant son utilisation - Correction de bugs lors de le gestion des clé étrangères dans l'ORM.
51 lines
1.5 KiB
Java
51 lines
1.5 KiB
Java
package fr.pandacube.java.util.db;
|
|
|
|
import java.util.UUID;
|
|
|
|
import fr.pandacube.java.util.db.sql_tools.SQLElement;
|
|
import fr.pandacube.java.util.db.sql_tools.SQLFKField;
|
|
import fr.pandacube.java.util.db.sql_tools.SQLField;
|
|
import fr.pandacube.java.util.db.sql_tools.SQLType;
|
|
|
|
public class SQLStaffTicket extends SQLElement<SQLStaffTicket> {
|
|
|
|
public SQLStaffTicket() {
|
|
super();
|
|
}
|
|
|
|
public SQLStaffTicket(int id) {
|
|
super(id);
|
|
}
|
|
|
|
@Override
|
|
protected String tableName() {
|
|
return "pandacube_staff_ticket";
|
|
}
|
|
|
|
public static final SQLFKField<SQLStaffTicket, String, SQLPlayer> playerId = new SQLFKField<>("playerId", SQLType.CHAR(36), false,
|
|
SQLPlayer.class, SQLPlayer.playerId);
|
|
public static final SQLField<SQLStaffTicket, String> message = new SQLField<>("message", SQLType.VARCHAR(1024), false);
|
|
public static final SQLField<SQLStaffTicket, Long> creationTime = new SQLField<>("creationTime", SQLType.BIGINT, false);
|
|
public static final SQLFKField<SQLStaffTicket, String, SQLPlayer> staffPlayerId = new SQLFKField<>("staffPlayerId",
|
|
SQLType.CHAR(36), true, SQLPlayer.class, SQLPlayer.playerId);
|
|
|
|
public UUID getPlayerId() {
|
|
String id = get(playerId);
|
|
return (id == null) ? null : UUID.fromString(id);
|
|
}
|
|
|
|
public void setPlayerId(UUID id) {
|
|
set(playerId, (id == null) ? null : id.toString());
|
|
}
|
|
|
|
public UUID getstaffPlayerId() {
|
|
String id = get(staffPlayerId);
|
|
return (id == null) ? null : UUID.fromString(id);
|
|
}
|
|
|
|
public void setstaffPlayerId(UUID id) {
|
|
set(staffPlayerId, (id == null) ? null : id.toString());
|
|
}
|
|
|
|
}
|