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