diff --git a/src/main/java/org/ntlab/acanthus_server/entities/Animation.java b/src/main/java/org/ntlab/acanthus_server/entities/Animation.java index 2744949..9f51029 100644 --- a/src/main/java/org/ntlab/acanthus_server/entities/Animation.java +++ b/src/main/java/org/ntlab/acanthus_server/entities/Animation.java @@ -2,9 +2,11 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.Date; +import java.util.HashMap; public class Animation { - private Integer aid; + private int aid; private String name; private String description; private Boolean ispublic; @@ -13,19 +15,18 @@ private Integer likes; private Integer views; private ArrayList hashTag; - private Integer owner; + private Account owner; private ArrayList editors; private ArrayList invites; - private ArrayList pageMap; + private HashMap pageMap; - public Animation(String name, Integer owner) { - - //一意のaidをふる - // this.aid = - this.ispublic = false; + public Animation(String name, Account owner) { + Date dt = new Date(); + this.createdDate = dt.toString(); + setIsPublic(false); this.owner = owner; - //this.editors.add(Editor); - //this.pageMap.add(0, this.aid); + this.editors.add(new Editor(owner)); + this.pageMap.put(0, 0); } public void setName(String name){ @@ -43,4 +44,9 @@ public Collection getAnimationInvites() { return invites; } + + public Integer getAid() { + return aid; + } } +