diff --git a/src/main/java/org/ntlab/amaryllis/server/entities/Account.java b/src/main/java/org/ntlab/amaryllis/server/entities/Account.java index 9aef321..29b2cd0 100644 --- a/src/main/java/org/ntlab/amaryllis/server/entities/Account.java +++ b/src/main/java/org/ntlab/amaryllis/server/entities/Account.java @@ -1,6 +1,7 @@ package org.ntlab.amaryllis.server.entities; import java.util.ArrayList; +import java.util.UUID; public class Account { private String uid; @@ -12,13 +13,22 @@ private ArrayList followers; private ArrayList history; private ArrayList contributions; - public Account(String name,String password){ - this.name=name; - this.password=password; - followings=new ArrayList<>(); - followers=new ArrayList<>(); - history=new ArrayList<>(); - contributions=new ArrayList<>(); + + public Account(String name, String password) { + this.name = name; + this.password = password; + this.uid= UUID.randomUUID().toString(); + this.token=UUID.randomUUID().toString(); + followings = new ArrayList<>(); + followers = new ArrayList<>(); + history = new ArrayList<>(); + contributions = new ArrayList<>(); } + public String getUid() { + return uid; + } + public String getToken(){ + return token; + } }