Merge pull request #175 from nitta-lab-2021/mifune
確認しました。
commit ed00af3f89f345dbdb65a9db548fd6e1c5b3b95f
2 parents b8e9fec + 7c5ccdf
michishita shouma authored on 30 Jun 2021
Showing 2 changed files
View
21
src/main/java/org/ntlab/acanthus_server/entities/Animation.java
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.ntlab.acanthus_server.models.Accounts;
import org.ntlab.acanthus_server.models.Gallery;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
 
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
@JsonProperty("description")
private String description;
private Boolean isPublic;
@JsonProperty("createdDate")
private LocalDateTime createdDate;
private String createdDate;
@JsonProperty("lastUpdate")
private String lastUpdate;
@JsonProperty("likes")
private Integer likes;
@JsonIgnore
private boolean isDummy;
 
public Animation(Integer aid, String name, Account owner) {
 
LocalDateTime date = LocalDateTime.now();
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");
// ↑  "yyyy/MM/dd HH:mm:ss"という形の日付を表示させるための前処理
 
this.aid = aid;
this.name = name;
this.createdDate = LocalDateTime.now();
this.createdDate = date.format(dateTimeFormatter);
this.isPublic = false;
this.owner = owner;
this.editors.add(new Editor(owner, true));
this.pageMap.put(0, new Page());
public Collection<Account> getInvites() {
return invites;
}
 
public LocalDateTime getCreatedDate(){return createdDate;}
public String getCreatedDate(){return createdDate;}
 
//-----------------------------------------------------------------
// remover
 
this.isPublic = false;
this.owner = ownerAccount;
this.editors.add(new Editor(owner, true));
this.pageMap.put(0, new Page());
this.createdDate = LocalDateTime.now();
 
LocalDateTime date = LocalDateTime.now();
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");
this.createdDate = date.format(dateTimeFormatter);
 
//this.lastAccess = LocalDateTime.of(2015, 12, 15, 0, 0);
 
var newWork = new Work(); //ユーザーの制作作品の作成
View
8
src/main/java/org/ntlab/acanthus_server/entities/AnimationJson.java
this.aid = animation.getAid();
this.animationName = animation.getName();
this.owner = animation.getOwner().getUid();
this.editors = animation.getEditors();
 
LocalDateTime date = animation.getCreatedDate();
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");
this.createdDate = date.format(dateTimeFormatter);
this.createdDate = animation.getCreatedDate();
 
}
 
}