rhj | 7912f2c | 2025-06-09 17:21:32 +0800 | [diff] [blame] | 1 | package entity; |
| 2 | |
| 3 | import java.util.Date; |
| 4 | |
| 5 | public class SeedWithPromotionDTO { |
| 6 | public String seedid; |
| 7 | public String seeduserid; |
| 8 | public String username; // 只包含用户名,而不是整个User对象 |
| 9 | public int faketime; |
| 10 | public Date lastfakecheck; |
| 11 | public String outurl; |
| 12 | public String title; |
| 13 | public String subtitle; |
| 14 | public String seedsize; |
| 15 | public String seedtag; |
| 16 | public int downloadtimes; |
| 17 | public String url; |
| 18 | public Integer discount; // 促销折扣,可能为null如果没有促销 |
| 19 | |
| 20 | public SeedWithPromotionDTO() {} |
| 21 | |
| 22 | public SeedWithPromotionDTO(Seed seed, Integer discount) { |
| 23 | this.seedid = seed.seedid; |
| 24 | this.seeduserid = seed.seeduserid; |
| 25 | this.username = seed.user != null ? seed.user.username : null; |
| 26 | this.faketime = seed.faketime; |
| 27 | this.lastfakecheck = seed.lastfakecheck; |
| 28 | this.outurl = seed.outurl; |
| 29 | this.title = seed.title; |
| 30 | this.subtitle = seed.subtitle; |
| 31 | this.seedsize = seed.seedsize; |
| 32 | this.seedtag = seed.seedtag; |
| 33 | this.downloadtimes = seed.downloadtimes; |
| 34 | this.url = seed.url; |
| 35 | this.discount = discount; |
| 36 | } |
| 37 | } |