|
|
@ -2,61 +2,104 @@ package app.entities.report; |
|
|
|
|
|
|
|
import app.entities.other.SteamID; |
|
|
|
import app.utils.SteamIDConverter; |
|
|
|
import jakarta.persistence.*; |
|
|
|
|
|
|
|
import java.sql.ResultSet; |
|
|
|
import java.sql.SQLException; |
|
|
|
|
|
|
|
@Entity |
|
|
|
@Table(schema = "tf2_facti13", name = "user_reports") |
|
|
|
public class Report { |
|
|
|
private final Integer id; |
|
|
|
@Id |
|
|
|
@Column(name = "id") |
|
|
|
private Long id; |
|
|
|
|
|
|
|
//author
|
|
|
|
private final String a_nickname; |
|
|
|
private final String a_steam2; |
|
|
|
private final Integer a_permition; |
|
|
|
private final Integer a_kills; |
|
|
|
private final Integer a_deads; |
|
|
|
private final Integer a_seconds; |
|
|
|
//author todo embedded
|
|
|
|
@Column(name = "a_nickname", length = 256) |
|
|
|
private String a_nickname; |
|
|
|
|
|
|
|
@Column(name = "a_steam2", length = 64) |
|
|
|
private String a_steam2; |
|
|
|
|
|
|
|
@Column(name = "a_permition") |
|
|
|
@Enumerated(value = EnumType.ORDINAL) |
|
|
|
private ReportPermition a_permition; |
|
|
|
|
|
|
|
@Column(name = "a_kills") |
|
|
|
private Long a_kills; |
|
|
|
|
|
|
|
@Column(name = "a_deads") |
|
|
|
private Long a_deads; |
|
|
|
|
|
|
|
@Column(name = "a_seconds") |
|
|
|
private Long a_seconds; |
|
|
|
|
|
|
|
//reported
|
|
|
|
private final String r_nickname; |
|
|
|
private final String r_steam2; |
|
|
|
private final Integer r_permition; |
|
|
|
private final Integer r_kills; |
|
|
|
private final Integer r_deads; |
|
|
|
private final Integer r_seconds; |
|
|
|
@Column(name = "r_nickname", length = 256) |
|
|
|
private String r_nickname; |
|
|
|
|
|
|
|
@Column(name = "r_steam2", length = 64) |
|
|
|
private String r_steam2; |
|
|
|
|
|
|
|
@Column(name = "r_permition") |
|
|
|
@Enumerated(value = EnumType.ORDINAL) |
|
|
|
private ReportPermition r_permition; |
|
|
|
|
|
|
|
@Column(name = "r_kills") |
|
|
|
private Long r_kills; |
|
|
|
|
|
|
|
@Column(name = "r_deads") |
|
|
|
private Long r_deads; |
|
|
|
|
|
|
|
@Column(name = "r_seconds") |
|
|
|
private Long r_seconds; |
|
|
|
|
|
|
|
//based
|
|
|
|
private final String reasons; |
|
|
|
private final long utime; |
|
|
|
private final String srv; |
|
|
|
private final Integer online; |
|
|
|
private final Integer type; |
|
|
|
@Column(name = "reasons", length = 512) |
|
|
|
private String reasons; |
|
|
|
|
|
|
|
@Column(name = "utime") |
|
|
|
private long utime; |
|
|
|
|
|
|
|
@Column(name = "srv") |
|
|
|
private String srv; |
|
|
|
|
|
|
|
@Column(name = "online") |
|
|
|
private Long online; |
|
|
|
|
|
|
|
@Column(name = "type") |
|
|
|
@Enumerated(value = EnumType.ORDINAL) |
|
|
|
private ReportType type; |
|
|
|
|
|
|
|
public Report(ResultSet rs) throws SQLException { |
|
|
|
id = rs.getInt("id"); |
|
|
|
id = rs.getLong("id"); |
|
|
|
//
|
|
|
|
a_nickname = rs.getString("a_nickname"); |
|
|
|
a_steam2 = rs.getString("a_steam2"); |
|
|
|
a_permition = rs.getInt("a_permition"); |
|
|
|
a_kills = rs.getInt("a_kills"); |
|
|
|
a_deads = rs.getInt("a_deads"); |
|
|
|
a_seconds = rs.getInt("a_seconds"); |
|
|
|
//a_permition = rs.getLong("a_permition");
|
|
|
|
a_kills = rs.getLong("a_kills"); |
|
|
|
a_deads = rs.getLong("a_deads"); |
|
|
|
a_seconds = rs.getLong("a_seconds"); |
|
|
|
//
|
|
|
|
r_nickname = rs.getString("r_nickname"); |
|
|
|
r_steam2 = rs.getString("r_steam2"); |
|
|
|
r_permition = rs.getInt("r_permition"); |
|
|
|
r_kills = rs.getInt("r_kills"); |
|
|
|
r_deads = rs.getInt("r_deads"); |
|
|
|
r_seconds = rs.getInt("r_seconds"); |
|
|
|
//r_permition = rs.getLong("r_permition");
|
|
|
|
r_kills = rs.getLong("r_kills"); |
|
|
|
r_deads = rs.getLong("r_deads"); |
|
|
|
r_seconds = rs.getLong("r_seconds"); |
|
|
|
//based
|
|
|
|
reasons = rs.getString("reasons"); |
|
|
|
utime = rs.getLong("utime"); |
|
|
|
srv = rs.getString("srv"); |
|
|
|
online = rs.getInt("online"); |
|
|
|
type = rs.getInt("type"); |
|
|
|
online = rs.getLong("online"); |
|
|
|
//type = rs.getLong("type");
|
|
|
|
} |
|
|
|
|
|
|
|
public Report() { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public Integer getId() { |
|
|
|
|
|
|
|
public Long getId() { |
|
|
|
return id; |
|
|
|
} |
|
|
|
|
|
|
@ -65,18 +108,18 @@ public class Report { |
|
|
|
} |
|
|
|
|
|
|
|
public ReportPermition getA_permition() { |
|
|
|
return ReportPermition.values()[a_permition]; |
|
|
|
return a_permition; |
|
|
|
} |
|
|
|
|
|
|
|
public Integer getA_kills() { |
|
|
|
public Long getA_kills() { |
|
|
|
return a_kills; |
|
|
|
} |
|
|
|
|
|
|
|
public Integer getA_deads() { |
|
|
|
public Long getA_deads() { |
|
|
|
return a_deads; |
|
|
|
} |
|
|
|
|
|
|
|
public Integer getA_seconds() { |
|
|
|
public Long getA_seconds() { |
|
|
|
return a_seconds; |
|
|
|
} |
|
|
|
|
|
|
@ -85,18 +128,18 @@ public class Report { |
|
|
|
} |
|
|
|
|
|
|
|
public ReportPermition getR_permition() { |
|
|
|
return ReportPermition.values()[r_permition]; |
|
|
|
return r_permition; |
|
|
|
} |
|
|
|
|
|
|
|
public Integer getR_kills() { |
|
|
|
public Long getR_kills() { |
|
|
|
return r_kills; |
|
|
|
} |
|
|
|
|
|
|
|
public Integer getR_deads() { |
|
|
|
public Long getR_deads() { |
|
|
|
return r_deads; |
|
|
|
} |
|
|
|
|
|
|
|
public Integer getR_seconds() { |
|
|
|
public Long getR_seconds() { |
|
|
|
return r_seconds; |
|
|
|
} |
|
|
|
|
|
|
@ -112,12 +155,12 @@ public class Report { |
|
|
|
return srv; |
|
|
|
} |
|
|
|
|
|
|
|
public Integer getOnline() { |
|
|
|
public Long getOnline() { |
|
|
|
return online; |
|
|
|
} |
|
|
|
|
|
|
|
public ReportType getType() { |
|
|
|
return ReportType.values()[type]; |
|
|
|
return type; |
|
|
|
} |
|
|
|
|
|
|
|
public SteamID getA_steam() { |
|
|
|