1 package com.srv4pos.server.api.treasurer;
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.NotNull;
12 import javax.validation.constraints.Pattern;
13 import javax.validation.constraints.Size;
14 import java.util.Date;
15
16
17
18
19 @RooJavaBean
20 @RooToString
21 @RooJson(deepSerialize = true)
22 public class TreasurerInfo implements SyncEntityInfo {
23
24
25
26
27
28 public enum Fields { IDENTIFIER, NAME, SSN }
29
30
31
32
33
34 private boolean deleted;
35
36
37
38
39
40 @NotNull(groups = IdentifierValidationGroup.class)
41 @Size(max = 50, min = 1)
42 @Pattern(regexp = Constraints.WINDOWS_FILENAME_REGEX)
43 private String identifier;
44
45
46
47
48 @NotNull
49 @Size(max = 32, min = 1)
50 private String name;
51
52
53
54
55 @NotNull
56 @Size(max = 16, min = 1)
57 private String ssn;
58
59 @Size(max = 65535)
60 private String custom;
61
62 private Integer version;
63
64 @JournalDate
65 private Date modified;
66
67 private String user;
68
69 @Size(max = 16, min = 1)
70 private String pin;
71 }