package net.frozenorb.apiv3.model; import lombok.Getter; import lombok.ToString; import net.frozenorb.apiv3.LiteFullJson; import org.bson.Document; @ToString public final class User implements LiteFullJson { @Getter private String id; public User(Document json) { this.id = json.getString("_id"); } public Document toLiteJson() { Document json = new Document(); json.put("_id", id); return json; } public Document toFullJson() { Document json = toLiteJson(); return json; } }