rhj | e18c3f7 | 2025-06-08 00:27:01 +0800 | [diff] [blame^] | 1 | package entity; |
| 2 | |
| 3 | import javax.persistence.Column; |
| 4 | import javax.persistence.Entity; |
| 5 | import javax.persistence.FetchType; |
| 6 | import javax.persistence.Id; |
| 7 | import javax.persistence.JoinColumn; |
| 8 | import javax.persistence.ManyToOne; |
| 9 | import javax.persistence.Table; |
| 10 | |
| 11 | @Entity |
| 12 | @Table(name = "BegDetail") |
| 13 | public class BegInfoDetail { |
| 14 | @Id |
| 15 | @Column(name = "beg_id", length = 64, nullable = false) |
| 16 | public String begId; |
| 17 | |
| 18 | @Column(name = "user_id", length = 36, nullable = false) |
| 19 | public String userId; |
| 20 | |
| 21 | @Column(name = "Info", nullable = false, columnDefinition = "TEXT") |
| 22 | public String info; |
| 23 | |
| 24 | @ManyToOne(fetch = FetchType.LAZY) |
| 25 | @JoinColumn(name = "user_id", insertable = false, updatable = false) |
| 26 | public User user; |
| 27 | |
| 28 | public BegInfoDetail() {} |
| 29 | |
| 30 | public BegInfoDetail(String begId, String userId, String info) { |
| 31 | this.begId = begId; |
| 32 | this.userId = userId; |
| 33 | this.info = info; |
| 34 | } |
| 35 | } |