1 package com.srv4pos.server.api.tax;
2
3 import com.srv4pos.server.api.infrastructure.Constraints;
4 import com.srv4pos.server.api.infrastructure.SyncEntityInfo;
5 import com.srv4pos.server.api.infrastructure.journal.JournalDate;
6 import com.srv4pos.server.api.validationGroups.IdentifierValidationGroup;
7 import org.springframework.roo.addon.javabean.RooJavaBean;
8 import org.springframework.roo.addon.json.RooJson;
9 import org.springframework.roo.addon.tostring.RooToString;
10
11 import javax.validation.constraints.Max;
12 import javax.validation.constraints.Min;
13 import javax.validation.constraints.NotNull;
14 import javax.validation.constraints.Pattern;
15 import javax.validation.constraints.Size;
16 import java.util.Date;
17
18
19
20
21
22 @RooJavaBean
23 @RooToString
24 @RooJson(deepSerialize = true)
25 public class TaxInfo implements SyncEntityInfo {
26
27
28
29
30
31 public static enum Fields { IDENTIFIER, NAME, VAT }
32
33
34
35
36
37 @NotNull
38 private boolean deleted = Boolean.FALSE;
39
40
41
42
43
44 @NotNull(groups = IdentifierValidationGroup.class)
45 @Size(max = 50, min = 1)
46 @Pattern(regexp = Constraints.WINDOWS_FILENAME_REGEX)
47 private String identifier;
48
49
50
51
52 @NotNull
53 @Max(100)
54 @Min(0)
55 private int vat;
56
57
58
59
60 @NotNull
61 @Size(max = 32, min = 1)
62 private String name;
63
64
65
66
67 @Size(max = 65535)
68 private String custom;
69
70 private Integer version;
71
72 @JournalDate
73 private Date modified;
74 }