Advertisement
Guest User

Model Classes

a guest
May 29th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1. public class PlayerModel { // Base Model of other models
  2.  
  3.     @DBSync
  4.     public String uuid;
  5.     @DBSync
  6.     public String username;
  7.     @DBSync
  8.     public String originalName;
  9.     @DBSync
  10.     public List<UsernameModel> names;
  11.  
  12. }
  13.  
  14. public class FriendModel extends PlayerModel { // The root document structure of the database document
  15.  
  16.     @DBSync
  17.     public List<UserModel> followers;
  18.    
  19. }
  20.  
  21. public class UserModel extends PlayerModel { // user model, currently empty, but has player's fields
  22.    
  23. }
  24.  
  25. public class UsernameModel { // username model, used in PlayerModel
  26.  
  27.     @DBSync public String name;
  28.     @DBSync public long changedToAt;
  29.    
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement