tj
2025-06-05 2d549a04870d1315868a7cf19952b64e8071e711
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.cloudroam.dto.book;
 
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
 
import javax.validation.constraints.NotEmpty;
 
/**
 * @author 
 * @author 
 * 图书创建/更新数据传输对象
 */
@Data
@NoArgsConstructor
public class CreateOrUpdateBookDTO {
 
    @NotEmpty(message = "{book.title.not-empty}")
    @Length(max = 50, message = "{book.title.length}")
    private String title;
 
    @NotEmpty(message = "{book.author.not-empty}")
    @Length(max = 50, message = "{book.author.length}")
    private String author;
 
    @NotEmpty(message = "{book.summary.not-empty}")
    @Length(max = 1000, message = "{book.summary.length}")
    private String summary;
 
    @Length(max = 100, message = "{book.image.length}")
    private String image;
}