Grasscutter/src/main/java/emu/grasscutter/database/DatabaseCounter.java

24 lines
417 B
Java
Raw Normal View History

2022-04-17 12:43:07 +00:00
package emu.grasscutter.database;
import dev.morphia.annotations.Entity;
import dev.morphia.annotations.Id;
2022-04-21 01:11:57 +00:00
@Entity(value = "counters", useDiscriminator = false)
2022-04-17 12:43:07 +00:00
public class DatabaseCounter {
@Id
private String id;
private int count;
public DatabaseCounter() {}
public DatabaseCounter(String id) {
this.id = id;
this.count = 10000;
}
public int getNextId() {
int id = ++count;
return id;
}
}