rhj | e18c3f7 | 2025-06-08 00:27:01 +0800 | [diff] [blame^] | 1 | package entity; |
| 2 | |
| 3 | import java.util.Date; |
| 4 | |
| 5 | /** |
| 6 | * 包含 BegSeed 表数据和对应 BegInfo 表 Info 字段的复合类 |
| 7 | * 用于 getBegSeedDetail 方法返回完整的求种详情 |
| 8 | */ |
| 9 | public class BegSeedDetail { |
| 10 | // BegSeed 表的字段 |
| 11 | public String begid; |
| 12 | public int begnumbers; |
| 13 | public int magic; |
| 14 | public Date endtime; |
| 15 | public int hasseed; |
| 16 | |
| 17 | // BegInfo 表的 Info 字段 |
| 18 | public String info; |
| 19 | |
| 20 | public BegSeedDetail() {} |
| 21 | |
| 22 | public BegSeedDetail(String begid, int begnumbers, int magic, Date endtime, int hasseed, String info) { |
| 23 | this.begid = begid; |
| 24 | this.begnumbers = begnumbers; |
| 25 | this.magic = magic; |
| 26 | this.endtime = endtime; |
| 27 | this.hasseed = hasseed; |
| 28 | this.info = info; |
| 29 | } |
| 30 | |
| 31 | // 从 BegInfo 和 BegInfoDetail 构造 |
| 32 | public BegSeedDetail(BegInfo begInfo, BegInfoDetail begInfoDetail) { |
| 33 | if (begInfo != null) { |
| 34 | this.begid = begInfo.begid; |
| 35 | this.begnumbers = begInfo.begnumbers; |
| 36 | this.magic = begInfo.magic; |
| 37 | this.endtime = begInfo.endtime; |
| 38 | this.hasseed = begInfo.hasseed; |
| 39 | } |
| 40 | |
| 41 | if (begInfoDetail != null) { |
| 42 | this.info = begInfoDetail.info; |
| 43 | } |
| 44 | } |
| 45 | } |