diff --git a/src/main/java/org/ntlab/acanthus_server/entities/Account.java b/src/main/java/org/ntlab/acanthus_server/entities/Account.java index 404301f..c6807aa 100644 --- a/src/main/java/org/ntlab/acanthus_server/entities/Account.java +++ b/src/main/java/org/ntlab/acanthus_server/entities/Account.java @@ -20,62 +20,65 @@ // //////////////////////////////////////////////////////////////////////////////////////// package org.ntlab.acanthus_server.entities; +import com.fasterxml.jackson.annotation.JsonIgnore; + +import java.util.ArrayList; import java.util.UUID; public class Account { + + private Integer uid; private String name; private String email; + private ArrayList workList = new ArrayList<>(); + + @JsonIgnore private String token; + @JsonIgnore private String password; - private Work work; //----------------------------------------------------------------- //コンストラクト - public Account(String name, String email, String password) { + public Account(Integer uid, String name, String email, String password) { + this.uid = uid; this.name = name; this.email = email; this.password = password; - this.work = new Work(); } //----------------------------------------------------------------- //----------------------------------------------------------------- // setter + public void setUid(Integer uid){this.uid = uid;} public void setName(String name) { this.name = name; } - //----------------------------------------------------------------- public void setEmail(String email) { this.email = email; } - //----------------------------------------------------------------- public void setPassword(String password){ this.password = password; } - //----------------------------------------------------------------- - public void setWork(Work work){ - this.work = work; - } + public void addWork(Work work){ this.workList.add(work); } + //----------------------------------------------------------------- // getter + public Integer getUid() {return (this.uid);} public String getName(){ return (this.name); } - //----------------------------------------------------------------- public String getEmail() { return (this.email); } - //----------------------------------------------------------------- public String getPassword() { return (this.password); } - //----------------------------------------------------------------- public String getToken() { return (this.token); } - //----------------------------------------------------------------- - public Work getWork() { - return (this.work); + public ArrayList getWork() { + return (this.workList); } + //----------------------------------------------------------------- //----------------------------------------------------------------- // トークンを更新する 藤井