SysSession.java
package com.rabbiter.cm.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Objects;
public class SysSession implements Serializable {
private static final Long serialVersionUID = 1L;
//场次
private Long sessionId;
//影厅编号
@NotNull(message = "场次所在影厅不能为空")
private Long hallId;
@NotBlank(message = "电影语言版本不能为空")
private String labguageVersion;
@NotNull(message = "场次安排电影不能为空")
private Long movieId;
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "HH:mm")
private String playTime;
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "HH:mm")
private String endTime;
private String deadLine;
@NotNull(message = "场次日期不能为空")
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
private LocalDate sessionDate;
@NotNull(message = "场次票价不能为空")
@Size(min = 0, message = "场次票价不能为负数")
private Double sessionPrice;
private String sessionTips;
@NotBlank(message = "场次座位信息不能为空")
private String sessionSeats;
private Integer seatNums;
private Integer sallNums;
private SysHall sysHall;
private SysMovie sysMovie;
public SysSession() {
}
@Override
public String toString() {
return "SysSession{" +
"sessionId=" + sessionId +
", hallId=" + hallId +
", labguageVersion='" + labguageVersion + '\'' +
", movieId=" + movieId +
", playTime='" + playTime + '\'' +
", endTime='" + endTime + '\'' +
", deadLine='" + deadLine + '\'' +
", sessionDate=" + sessionDate +
", sessionPrice=" + sessionPrice +
", sessionTips='" + sessionTips + '\'' +
", sessionSeats='" + sessionSeats + '\'' +
", seatNums=" + seatNums +
", sallNums=" + sallNums +
", sysHall=" + sysHall +
", sysMovie=" + sysMovie +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o==null||getClass()!=o.getClass()) return false;
SysSession that = (SysSession) o;
return Objects.equals(sessionId, that.sessionId) && Objects.equals(hallId, that.hallId) && Objects.equals(labguageVersion, that.labguageVersion) && Objects.equals(movieId, that.movieId) && Objects.equals(playTime, that.playTime) && Objects.equals(endTime, that.endTime) && Objects.equals(deadLine, that.deadLine) && Objects.equals(sessionDate, that.sessionDate) && Objects.equals(sessionPrice, that.sessionPrice) && Objects.equals(sessionTips, that.sessionTips) && Objects.equals(sessionSeats, that.sessionSeats) && Objects.equals(seatNums, that.seatNums) && Objects.equals(sallNums, that.sallNums) && Objects.equals(sysHall, that.sysHall) && Objects.equals(sysMovie, that.sysMovie);
}
@Override
public int hashCode() {
return Objects.hash(sessionId, hallId, labguageVersion, movieId, playTime, endTime, deadLine, sessionDate, sessionPrice, sessionTips, sessionSeats, seatNums, sallNums, sysHall, sysMovie);
}
public SysSession(Long sessionId, Long hallId, String labguageVersion, Long movieId, String playTime, String endTime, String deadLine, LocalDate sessionDate, Double sessionPrice, String sessionTips, String sessionSeats, Integer seatNums, Integer sallNums, SysHall sysHall, SysMovie sysMovie) {
this.sessionId = sessionId;
this.hallId = hallId;
this.labguageVersion = labguageVersion;
this.movieId = movieId;
this.playTime = playTime;
this.endTime = endTime;
this.deadLine = deadLine;
this.sessionDate = sessionDate;
this.sessionPrice = sessionPrice;
this.sessionTips = sessionTips;
this.sessionSeats = sessionSeats;
this.seatNums = seatNums;
this.sallNums = sallNums;
this.sysHall = sysHall;
this.sysMovie = sysMovie;
}
public SysMovie getSysMovie() {
return sysMovie;
}
public void setSysMovie(SysMovie sysMovie) {
this.sysMovie = sysMovie;
}
public SysHall getSysHall() {
return sysHall;
}
public void setSysHall(SysHall sysHall) {
this.sysHall = sysHall;
}
public Integer getSallNums() {
return sallNums;
}
public void setSallNums(Integer sallNums) {
this.sallNums = sallNums;
}
public Integer getSeatNums() {
return seatNums;
}
public void setSeatNums(Integer seatNums) {
this.seatNums = seatNums;
}
public @NotBlank(message = "场次座位信息不能为空") String getSessionSeats() {
return sessionSeats;
}
public void setSessionSeats(@NotBlank(message = "场次座位信息不能为空") String sessionSeats) {
this.sessionSeats = sessionSeats;
}
public String getSessionTips() {
return sessionTips;
}
public void setSessionTips(String sessionTips) {
this.sessionTips = sessionTips;
}
public @NotNull(message = "场次票价不能为空") @Size(min = 0, message = "场次票价不能为负数") Double getSessionPrice() {
return sessionPrice;
}
public void setSessionPrice(@NotNull(message = "场次票价不能为空") @Size(min = 0, message = "场次票价不能为负数") Double sessionPrice) {
this.sessionPrice = sessionPrice;
}
public @NotNull(message = "场次日期不能为空") LocalDate getSessionDate() {
return sessionDate;
}
public void setSessionDate(@NotNull(message = "场次日期不能为空") LocalDate sessionDate) {
this.sessionDate = sessionDate;
}
public String getDeadLine() {
return deadLine;
}
public void setDeadLine(String deadLine) {
this.deadLine = deadLine;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getPlayTime() {
return playTime;
}
public void setPlayTime(String playTime) {
this.playTime = playTime;
}
public @NotNull(message = "场次安排电影不能为空") Long getMovieId() {
return movieId;
}
public void setMovieId(@NotNull(message = "场次安排电影不能为空") Long movieId) {
this.movieId = movieId;
}
public @NotBlank(message = "电影语言版本不能为空") String getLabguageVersion() {
return labguageVersion;
}
public void setLabguageVersion(@NotBlank(message = "电影语言版本不能为空") String labguageVersion) {
this.labguageVersion = labguageVersion;
}
public @NotNull(message = "场次所在影厅不能为空") Long getHallId() {
return hallId;
}
public void setHallId(@NotNull(message = "场次所在影厅不能为空") Long hallId) {
this.hallId = hallId;
}
public Long getSessionId() {
return sessionId;
}
public void setSessionId(Long sessionId) {
this.sessionId = sessionId;
}
}
SysSession.java
https://luckysheeps.com/index.php/archives/3/