Extend Models

This commit is contained in:
Stefan Schueller 2018-03-10 22:59:39 +01:00
parent 32c563483e
commit 231350f78f
4 changed files with 389 additions and 0 deletions

View File

@ -0,0 +1,114 @@
package net.schueller.peertube.model;
import java.util.Date;
public class Account {
private Integer id;
private String url;
private String uuid;
private String name;
private String host;
private Integer followingCount;
private Integer followersCount;
private String avatar;
private Date createdAt;
private Date updatedAt;
private String displayName;
private String description;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public Integer getFollowingCount() {
return followingCount;
}
public void setFollowingCount(Integer followingCount) {
this.followingCount = followingCount;
}
public Integer getFollowersCount() {
return followersCount;
}
public void setFollowersCount(Integer followersCount) {
this.followersCount = followersCount;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public String getDisplayName() {
return displayName;
}
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}

View File

@ -0,0 +1,132 @@
package net.schueller.peertube.model;
import java.util.Date;
public class Channel {
private Integer id;
private String url;
private String uuid;
private String name;
private String host;
private Integer followingCount;
private Integer followersCount;
private String avatar;
private Date createdAt;
private Date updatedAt;
private String displayName;
private String description;
private String support;
private Boolean isLocal;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public Integer getFollowingCount() {
return followingCount;
}
public void setFollowingCount(Integer followingCount) {
this.followingCount = followingCount;
}
public Integer getFollowersCount() {
return followersCount;
}
public void setFollowersCount(Integer followersCount) {
this.followersCount = followersCount;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public String getDisplayName() {
return displayName;
}
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getSupport() {
return support;
}
public void setSupport(String support) {
this.support = support;
}
public Boolean getLocal() {
return isLocal;
}
public void setLocal(Boolean local) {
isLocal = local;
}
}

View File

@ -0,0 +1,58 @@
package net.schueller.peertube.model;
public class File {
private Integer resolution;
private String resolutionLabel;
private String magnetUri;
private Integer size;
private String torrentUrl;
private String fileUrl;
public Integer getResolution() {
return resolution;
}
public void setResolution(Integer resolution) {
this.resolution = resolution;
}
public String getResolutionLabel() {
return resolutionLabel;
}
public void setResolutionLabel(String resolutionLabel) {
this.resolutionLabel = resolutionLabel;
}
public String getMagnetUri() {
return magnetUri;
}
public void setMagnetUri(String magnetUri) {
this.magnetUri = magnetUri;
}
public Integer getSize() {
return size;
}
public void setSize(Integer size) {
this.size = size;
}
public String getTorrentUrl() {
return torrentUrl;
}
public void setTorrentUrl(String torrentUrl) {
this.torrentUrl = torrentUrl;
}
public String getFileUrl() {
return fileUrl;
}
public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl;
}
}

View File

@ -1,5 +1,6 @@
package net.schueller.peertube.model;
import java.util.ArrayList;
import java.util.Date;
public class Video {
@ -28,6 +29,18 @@ public class Video {
private Date createdAt;
private Date updatedAt;
private String privacyLabel;
private Integer privacy;
private String support;
private String descriptionPath;
private Channel channel;
private Account account;
private ArrayList tags;
private Boolean commentsEnabled;
private ArrayList<File> files;
public Video() {
}
@ -215,4 +228,76 @@ public class Video {
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public String getPrivacyLabel() {
return privacyLabel;
}
public void setPrivacyLabel(String privacyLabel) {
this.privacyLabel = privacyLabel;
}
public Integer getPrivacy() {
return privacy;
}
public void setPrivacy(Integer privacy) {
this.privacy = privacy;
}
public String getSupport() {
return support;
}
public void setSupport(String support) {
this.support = support;
}
public String getDescriptionPath() {
return descriptionPath;
}
public void setDescriptionPath(String descriptionPath) {
this.descriptionPath = descriptionPath;
}
public Channel getChannel() {
return channel;
}
public void setChannel(Channel channel) {
this.channel = channel;
}
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
public ArrayList getTags() {
return tags;
}
public void setTags(ArrayList tags) {
this.tags = tags;
}
public Boolean getCommentsEnabled() {
return commentsEnabled;
}
public void setCommentsEnabled(Boolean commentsEnabled) {
this.commentsEnabled = commentsEnabled;
}
public ArrayList<File> getFiles() {
return files;
}
public void setFiles(ArrayList<File> files) {
this.files = files;
}
}