Добавил таблицы для геолокации
This commit is contained in:
AidarKC
2025-12-10 13:54:15 +03:00
parent 2ab1bbc02c
commit 87da6efbfb
4 changed files with 190 additions and 21 deletions
@@ -0,0 +1,49 @@
package shine.db.entities;
/**
* Запись в таблице ip_geo_cache.
*
* Храним:
* - ip — строка IP-адреса (PRIMARY KEY)
* - geo — строка "Country, City" или любое текстовое описание
* - updatedAtMs — время последнего обновления (Unix time в мс)
*/
public class IpGeoCacheEntry {
private String ip;
private String geo;
private long updatedAtMs;
public IpGeoCacheEntry() {
}
public IpGeoCacheEntry(String ip, String geo, long updatedAtMs) {
this.ip = ip;
this.geo = geo;
this.updatedAtMs = updatedAtMs;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getGeo() {
return geo;
}
public void setGeo(String geo) {
this.geo = geo;
}
public long getUpdatedAtMs() {
return updatedAtMs;
}
public void setUpdatedAtMs(long updatedAtMs) {
this.updatedAtMs = updatedAtMs;
}
}