Add better indexes on ipLog and punishments
This commit is contained in:
parent
4bf36447b2
commit
afa31fb8b6
@ -4,15 +4,19 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import net.frozenorb.apiv3.APIv3;
|
||||
import org.bson.types.ObjectId;
|
||||
import org.mongodb.morphia.annotations.Entity;
|
||||
import org.mongodb.morphia.annotations.Id;
|
||||
import org.mongodb.morphia.annotations.Indexed;
|
||||
import org.mongodb.morphia.annotations.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity(value = "ipLog", noClassnameStored = true)
|
||||
@AllArgsConstructor
|
||||
@Indexes(
|
||||
@Index(fields = {
|
||||
@Field("user"),
|
||||
@Field("userIp")
|
||||
})
|
||||
)
|
||||
public final class IPLogEntry {
|
||||
|
||||
@Getter @Id private String id;
|
||||
|
@ -7,9 +7,7 @@ import net.frozenorb.apiv3.actors.Actor;
|
||||
import net.frozenorb.apiv3.actors.ActorType;
|
||||
import net.frozenorb.apiv3.utils.TimeUtils;
|
||||
import org.bson.types.ObjectId;
|
||||
import org.mongodb.morphia.annotations.Entity;
|
||||
import org.mongodb.morphia.annotations.Id;
|
||||
import org.mongodb.morphia.annotations.Indexed;
|
||||
import org.mongodb.morphia.annotations.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
@ -17,6 +15,12 @@ import java.util.UUID;
|
||||
|
||||
@Entity(value = "punishments", noClassnameStored = true)
|
||||
@AllArgsConstructor
|
||||
@Indexes(
|
||||
@Index(fields = {
|
||||
@Field("user"),
|
||||
@Field("type")
|
||||
})
|
||||
)
|
||||
public final class Punishment {
|
||||
|
||||
@Getter @Id private String id;
|
||||
|
Loading…
Reference in New Issue
Block a user