| | package org.ntlab.acanthus_server.entities; |
---|
| | |
---|
| | import com.fasterxml.jackson.annotation.JsonIgnore; |
---|
| | import org.ntlab.acanthus_server.models.Accounts; |
---|
| | import org.ntlab.acanthus_server.models.Gallery; |
---|
| | |
---|
| | import java.time.LocalDateTime; |
---|
| | import java.util.ArrayList; |
---|
| | import java.util.Collection; |
---|
| | import java.util.Date; |
---|
| | import java.util.HashMap; |
---|
| |
---|
| | private int aid; |
---|
| | private String name; |
---|
| | private String description; |
---|
| | private Boolean isPublic; |
---|
| | private String createdDate; |
---|
| | private LocalDateTime createdDate; |
---|
| | private String lastUpdate; |
---|
| | private Integer likes; |
---|
| | private Integer views; |
---|
| | private ArrayList<String> hashTag = new ArrayList<>(); |
---|
| |
---|
| | private ArrayList<Editor> editors = new ArrayList<>(); |
---|
| | private ArrayList<Account> invites = new ArrayList<>(); |
---|
| | private HashMap<Integer,Integer> pageMap = new HashMap<>(); |
---|
| | |
---|
| | @JsonIgnore |
---|
| | private boolean isDummy; |
---|
| | |
---|
| | public Animation(Integer aid, String name, Account owner) { |
---|
| | this.aid = aid; |
---|
| | this.name = name; |
---|
| | Date dt = new Date(); |
---|
| | this.createdDate = dt.toString(); |
---|
| | this.createdDate = LocalDateTime.now(); |
---|
| | this.isPublic = false; |
---|
| | this.owner = owner; |
---|
| | this.editors.add(new Editor(owner, true)); |
---|
| | this.pageMap.put(0, 0); |
---|
| |
---|
| | Account invitedAccount = accounts.getAccountByUid(Integer.parseInt(invitedUid)); |
---|
| | invites.remove(invitedAccount); |
---|
| | } |
---|
| | |
---|
| | |
---|
| | //----------------------------------------------------------------- |
---|
| | //gallery/aid/editorsのPUTの中身の処理 |
---|
| | public void restWorkToEditors(Integer aid, Integer Uid) { |
---|
| | Account account = accounts.getAccountByUid(Uid); |
---|
| | Animation animation = gallery.getAnimationByAid(aid); |
---|
| | |
---|
| | Editor editor = new Editor(account, false); |
---|
| | editor.setAccount(account); |
---|
| | animation.addEditors(editor); |
---|
| | animation.removeAnimationInvites(account); |
---|
| | } |
---|
| | |
---|
| | |
---|
| | //----------------------------------------------------------------- |
---|
| | //----------------------------------------------------------------- |
---|
| | // ダミー |
---|
| | private void createDummyAnimation() { |
---|
| | this.isDummy = true; |
---|
| | this.aid = 1111; |
---|
| | this.name = "dummyAnimation"; |
---|
| | this.isPublic = false; |
---|
| | this.owner = accounts.getAccountByUid(1); |
---|
| | this.editors.add(new Editor(owner, true)); |
---|
| | this.pageMap.put(0,0); |
---|
| | this.createdDate = LocalDateTime.now(); |
---|
| | |
---|
| | //this.lastAccess = LocalDateTime.of(2015, 12, 15, 0, 0); |
---|
| | } |
---|
| | //----------------------------------------------------------------- |
---|
| | } |
---|
| | |
---|
| | |
---|
| | |
No description provided.
確認しました。
5bb9f52
intomaster
fromAnimationBug
on 29 May 2021