1 package com.srv4pos.server.api.day;
2
3 import com.srv4pos.server.api.infrastructure.Constraints;
4 import com.srv4pos.server.api.infrastructure.Info;
5 import com.srv4pos.server.api.infrastructure.SyncEntityInfo;
6 import com.srv4pos.server.api.infrastructure.journal.JournalDate;
7 import com.srv4pos.server.api.validationGroups.IdentifierValidationGroup;
8 import org.springframework.roo.addon.javabean.RooJavaBean;
9 import org.springframework.roo.addon.json.RooJson;
10 import org.springframework.roo.addon.tostring.RooToString;
11
12 import javax.validation.constraints.NotNull;
13 import javax.validation.constraints.Pattern;
14 import javax.validation.constraints.Size;
15 import java.util.Date;
16
17
18
19
20
21 @RooJavaBean
22 @RooToString
23 @RooJson(deepSerialize = true)
24 public class DayInfo implements SyncEntityInfo {
25
26
27
28
29 public static enum Fields { IDENTIFIER, DAY_NUMBER, VERSION }
30
31 @NotNull
32 private int dayNumber;
33
34 @NotNull(groups = IdentifierValidationGroup.class)
35 @Size(max = 50, min = 1)
36 @Pattern(regexp = Constraints.WINDOWS_FILENAME_REGEX)
37 private String identifier;
38
39 @NotNull
40 private boolean opened;
41
42 @NotNull
43 private boolean reportPrinted;
44
45 @NotNull
46 private Date open;
47
48 private Date close;
49
50 @NotNull
51 private long cash;
52
53 @NotNull
54 private long cashAtClose;
55
56 @NotNull
57 private long grandTotal;
58
59 @NotNull
60 private long grandTotalRefund;
61
62 private Integer version;
63
64 private String cashRegisterName;
65
66 private String closedDayTreasurer;
67
68 @NotNull
69 @JournalDate
70 private Date modified;
71
72 }