You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

168 lines
5.0 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package cn.itbaizhan.po;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity //表示它是实体类交给Hibernate管理意味着跟数据库的某张表对应。javax.persistence包其实Hibernate是此JPA标准的实现。
@Table(name="orderform") //表名
public class OrderForm implements java.io.Serializable {
@Id //加主键一般写在其get方法上或是属性上
@GeneratedValue(strategy = GenerationType.AUTO) //Id的生成策略。javax.persistence包
private Integer orderFormId; //订单编号
private String username; //用户名
private String submitTime; //提交订单时间
private String consignmentTime; //发货时间
private Double totalPrice; //总金额
private String remark; //买家备注
private String isPayoff; //买家是否付款
private String isConsignment; //是否发货
private Long orderFormNum; //订单流水号
// 无参构造函数用于创建OrderForm类的实例
public OrderForm()
{}
// 带参数的构造函数用于根据给定的参数创建OrderForm类的实例
public OrderFo // 订单表类的构造方法,用于初始化订单信息
public OrderForm(String username, String submitTime,
String consignmentTime, Double totalPrice, String remark,
String isPayoff, String isConsignment, Long orderFormNum) {
// 设置订单的用户名、提交时间、委托时间、总价和备注信息
this.username = username; // 设置用户名
this.submitTime = submitTime; // 设置提交时间
this.consignmentTime = consignmentTime; // 设置委托时间
this.totalPrice = totalPrice; // 设置总价
this.remark = remark; // 设置备注
this.isPayoff = isPayoff; // 设置是否已支付
this.isConsignment = isConsignment; // 设置是否已委托
// 设置订单表单编号
this.setOrderFormNum(orderFormNum);
}
// 获取订单表单的ID
// 获取订单表单的ID
public Integer getOrderFormId() {
return this.orderFormId;
}
// 设置订单表单的ID
public void setOrderFormId(Integer orderFormId) {
this.orderFormId = orderFormId;
}
// 获取用户名
public String getUsername() {
// 返回当前对象的用户名
return this.username;
}
// 设置用户名
public void setUsername(String username) {
this.username = username;
}
// 获取提交时间的方法
public String getSubmitTime() {
// 返回提交时间
return this.submitTime;
}
// 设置提交时间的方法
public void setSubmitTime(String submitTime) {
this.submitTime = submitTime;
}
// 获取订单发货时间
public String getConsignmentTime() {
// 返回订单的发货时间
return this.consignmentTime;
}
// 设置订单发货时间
public void setConsignmentTime(String consignmentTime) {
this.consignmentTime = consignmentTime;
}
// 获取订单的总价
public Double getTotalPrice() {
// 返回订单的总价格
return this.totalPrice;
```
}
// 设置订单的总价
public void setTotalPrice(Double totalPrice) {
this.totalPrice = totalPrice;
}
/**
* 获取订单备注信息
* @return 订单备注字符串
*/
public String getRemark() {
// 返回订单备注信息
return this.remark;
}
/**
* 设置订单备注信息
* @param remark 订单备注字符串
*/
public void setRemark(String remark) {
this.remark = remark;
}
public String getIsPayoff() {
// 返回当前订单的支付状态
return this.isPayoff;
}
public void setIsPayoff(String isPayoff) {
// 设置当前订单的支付状态
this.isPayoff = isPayoff;
}
public String getIsConsignment() {
// 获取订单是否为代发的标志
return this.isConsignment;
}
public void setIsConsignment(String isConsignment) {
// 设置订单是否为代发的标志
this.isConsignment = isConsignment;
}
/**
* 设置订单表单编号
* @param orderFormNum 订单表单编号
*/
/**
* 设置订单表单编号
* @param orderFormNum 订单表单编号
*/
// 设置订单表单编号
public void setOrderFormNum(Long orderFormNum) {
this.orderFormNum = orderFormNum;
}
/**
* 获取订单表单编号
* @return 订单表单编号
*/
// 获取订单表的数量
public Long getOrderFormNum() {
// 返回订单表单编号
return orderFormNum;
}
}