From 329d3ae5782a07b8e14d123ebe6c95f6334984b8 Mon Sep 17 00:00:00 2001 From: prwfxgajt <3165503644@qq.com> Date: Sun, 15 Dec 2024 12:26:09 +0800 Subject: [PATCH] Update Prep.java ysx --- ticketing-master/src/com/cn/domain/Prep.java | 293 +++++++++++-------- 1 file changed, 164 insertions(+), 129 deletions(-) diff --git a/ticketing-master/src/com/cn/domain/Prep.java b/ticketing-master/src/com/cn/domain/Prep.java index a13a46a..ca5d39a 100644 --- a/ticketing-master/src/com/cn/domain/Prep.java +++ b/ticketing-master/src/com/cn/domain/Prep.java @@ -1,139 +1,174 @@ -package com.cn.domain; +package com.cn.domain; // 定义类的包名 -import java.sql.Timestamp; +import java.sql.Timestamp; // 导入Timestamp类,用于处理日期和时间 /** - * + * 订票信息实体类 * @ClassName: Prep * @Description: 订票信息实体类 * @author: ljy * @date: 2019年9月14日 下午5:12:42 */ public class Prep { - private Integer prepId; // 序号 - private Integer trainId; // 车次id - private Integer pmemberId; // 会员信息ID - private String startStation;// 起始站 - private String endStation; // 终点站 - private String trainNumber; // 火车车次 - private String startTime; // 开车时间 - private String endTime; // 到站时间 - private Integer price; // 车票价格 - private boolean way; // 付款情况 - private Timestamp booktime; // 订票时间 - - public Prep(Integer prepId, Integer trainId, Integer pmemberId, String startStation, String endStation, - String trainNumber, String startTime, String endTime, Integer price, boolean way, Timestamp booktime) { - this.prepId = prepId; - this.trainId = trainId; - this.pmemberId = pmemberId; - this.startStation = startStation; - this.endStation = endStation; - this.trainNumber = trainNumber; - this.startTime = startTime; - this.endTime = endTime; - this.price = price; - this.way = way; - this.booktime = booktime; - } - - public Prep() { - } - - public Integer getPrepId() { - return prepId; - } - - public void setPrepId(Integer prepId) { - this.prepId = prepId; - } - - public Integer getTrainId() { - return trainId; - } - - public void setTrainId(Integer trainId) { - this.trainId = trainId; - } - - public Integer getPmemberId() { - return pmemberId; - } - - public void setPmemberId(Integer pmemberId) { - this.pmemberId = pmemberId; - } - - public String getStartStation() { - return startStation; - } - - public void setStartStation(String startStation) { - this.startStation = startStation; - } - - public String getEndStation() { - return endStation; - } - - public void setEndStation(String endStation) { - this.endStation = endStation; - } - - public String getTrainNumber() { - return trainNumber; - } - - public void setTrainNumber(String trainNumber) { - this.trainNumber = trainNumber; - } - - public String getStartTime() { - return startTime; - } - - public void setStartTime(String startTime) { - this.startTime = startTime; - } - - public String getEndTime() { - return endTime; - } - - public void setEndTime(String endTime) { - this.endTime = endTime; - } - - public Integer getPrice() { - return price; - } - - public void setPrice(Integer price) { - this.price = price; - } - - public boolean isWay() { - return way; - } - - public void setWay(boolean way) { - this.way = way; - } - - public Timestamp getBooktime() { - return booktime; - } - - public void setBooktime(Timestamp booktime) { - this.booktime = booktime; - } - - @Override - public String toString() { - return "Prep [prepId=" + prepId + ", trainId=" + trainId + ", pmemberId=" + pmemberId + ", startStation=" - + startStation + ", endStation=" + endStation + ", trainNumber=" + trainNumber + ", startTime=" - + startTime + ", endTime=" + endTime + ", price=" + price + ", way=" + way + ", booktime=" + booktime - + "]"; - } - + // 序号 + private Integer prepId; + // 车次id + private Integer trainId; + // 会员信息ID + private Integer pmemberId; + // 起始站 + private String startStation; + // 终点站 + private String endStation; + // 火车车次 + private String trainNumber; + // 开车时间 + private String startTime; + // 到站时间 + private String endTime; + // 车票价格 + private Integer price; + // 付款情况,true为已付款,false为未付款 + private boolean way; + // 订票时间 + private Timestamp booktime; + + // 构造函数,包含所有属性 + public Prep(Integer prepId, Integer trainId, Integer pmemberId, String startStation, String endStation, + String trainNumber, String startTime, String endTime, Integer price, boolean way, Timestamp booktime) { + this.prepId = prepId; + this.trainId = trainId; + this.pmemberId = pmemberId; + this.startStation = startStation; + this.endStation = endStation; + this.trainNumber = trainNumber; + this.startTime = startTime; + this.endTime = endTime; + this.price = price; + this.way = way; + this.booktime = booktime; + } + + // 无参构造函数 + public Prep() { + } + + // 获取序号 + public Integer getPrepId() { + return prepId; + } + + // 设置序号 + public void setPrepId(Integer prepId) { + this.prepId = prepId; + } + + // 获取车次id + public Integer getTrainId() { + return trainId; + } + + // 设置车次id + public void setTrainId(Integer trainId) { + this.trainId = trainId; + } + + // 获取会员信息ID + public Integer getPmemberId() { + return pmemberId; + } + + // 设置会员信息ID + public void setPmemberId(Integer pmemberId) { + this.pmemberId = pmemberId; + } + + // 获取起始站 + public String getStartStation() { + return startStation; + } + + // 设置起始站 + public void setStartStation(String startStation) { + this.startStation = startStation; + } + + // 获取终点站 + public String getEndStation() { + return endStation; + } + + // 设置终点站 + public void setEndStation(String endStation) { + this.endStation = endStation; + } + + // 获取火车车次 + public String getTrainNumber() { + return trainNumber; + } + + // 设置火车车次 + public void setTrainNumber(String trainNumber) { + this.trainNumber = trainNumber; + } + + // 获取开车时间 + public String getStartTime() { + return startTime; + } + + // 设置开车时间 + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + // 获取到站时间 + public String getEndTime() { + return endTime; + } + + // 设置到站时间 + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + // 获取车票价格 + public Integer getPrice() { + return price; + } + + // 设置车票价格 + public void setPrice(Integer price) { + this.price = price; + } + + // 检查付款情况 + public boolean isWay() { + return way; + } + + // 设置付款情况 + public void setWay(boolean way) { + this.way = way; + } + + // 获取订票时间 + public Timestamp getBooktime() { + return booktime; + } + + // 设置订票时间 + public void setBooktime(Timestamp booktime) { + this.booktime = booktime; + } + + // 返回Prep对象的字符串表示形式 + @Override + public String toString() { + return "Prep [prepId=" + prepId + ", trainId=" + trainId + ", pmemberId=" + pmemberId + ", startStation=" + + startStation + ", endStation=" + endStation + ", trainNumber=" + trainNumber + ", startTime=" + + startTime + ", endTime=" + endTime + ", price=" + price + ", way=" + way + ", booktime=" + booktime + + "]"; + } }