📄 trade.java
字号:
package entities;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
@Entity()
public class Trade implements java.io.Serializable {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private Long id;
@ManyToOne
private Stock stock;
private long shareNum;
private double price;
@ManyToOne
private TradeType type;
/** Creates a new instance of Trade */
public Trade() {
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Stock getStock() {
return stock;
}
public void setStock(Stock stock) {
this.stock = stock;
}
public long getShareNum() {
return shareNum;
}
public void setShareNum(long shareNum) {
this.shareNum = shareNum;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public TradeType getType() {
return type;
}
public void setType(TradeType type) {
this.type = type;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -