2018-07-06 13:30:00 +00:00
|
|
|
package com.eu.habbo.habbohotel.modtool;
|
|
|
|
|
|
|
|
import gnu.trove.set.hash.THashSet;
|
|
|
|
|
|
|
|
import java.sql.ResultSet;
|
|
|
|
import java.sql.SQLException;
|
|
|
|
|
2019-05-26 21:14:53 +03:00
|
|
|
public class ModToolRoomVisit implements Comparable<ModToolRoomVisit> {
|
2018-07-06 13:30:00 +00:00
|
|
|
public int roomId;
|
|
|
|
public String roomName;
|
|
|
|
public int timestamp;
|
|
|
|
public int exitTimestamp;
|
|
|
|
public THashSet<ModToolChatLog> chat;
|
|
|
|
|
2019-05-26 21:14:53 +03:00
|
|
|
public ModToolRoomVisit(ResultSet set) throws SQLException {
|
2018-07-06 13:30:00 +00:00
|
|
|
this.roomId = set.getInt("room_id");
|
|
|
|
this.roomName = set.getString("name");
|
|
|
|
this.timestamp = set.getInt("timestamp");
|
|
|
|
}
|
|
|
|
|
2019-05-26 21:14:53 +03:00
|
|
|
public ModToolRoomVisit(int roomId, String roomName, int timestamp, int exitTimestamp) {
|
2018-07-06 13:30:00 +00:00
|
|
|
this.roomId = roomId;
|
|
|
|
this.roomName = roomName;
|
|
|
|
this.timestamp = timestamp;
|
|
|
|
this.exitTimestamp = exitTimestamp;
|
2018-09-28 19:25:00 +00:00
|
|
|
this.chat = new THashSet<>();
|
2018-07-06 13:30:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-05-26 21:14:53 +03:00
|
|
|
public int compareTo(ModToolRoomVisit o) {
|
2018-07-06 13:30:00 +00:00
|
|
|
return o.timestamp - this.timestamp;
|
|
|
|
}
|
|
|
|
}
|