根据下面字段生成jpa实体类 "selfAccNum": 100, "selfAccAmt": 100, "abcAccNum": 100, "abcAccAmt": 100, "rbcAccNum": 100, "rbcAccAmt": 100, "totalNum": 300, "totalAmt": 300
时间: 2023-07-06 18:43:42 浏览: 72
根据字段生成的JPA实体类如下所示:
```
@Entity
@Table(name = "account_info")
public class AccountInfo {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "self_acc_num")
private Integer selfAccNum;
@Column(name = "self_acc_amt")
private BigDecimal selfAccAmt;
@Column(name = "abc_acc_num")
private Integer abcAccNum;
@Column(name = "abc_acc_amt")
private BigDecimal abcAccAmt;
@Column(name = "rbc_acc_num")
private Integer rbcAccNum;
@Column(name = "rbc_acc_amt")
private BigDecimal rbcAccAmt;
@Column(name = "total_num")
private Integer totalNum;
@Column(name = "total_amt")
private BigDecimal totalAmt;
// getters and setters
}
```
其中,`@Entity`注解表示该类是一个JPA实体类,`@Table`注解指定了该实体类对应的数据库表名。`@Id`和`@GeneratedValue`注解表示该类的主键字段,`@Column`注解表示该类的其他字段。
阅读全文