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.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
20 @RooJavaBean
21 @RooToString
22 @RooJson(deepSerialize = true)
23 public class DayInfo implements Info {
24
25
26
27
28 public static enum Fields { IDENTIFIER, DAY_NUMBER, VERSION }
29
30 @NotNull
31 private int dayNumber;
32
33 @NotNull(groups = IdentifierValidationGroup.class)
34 @Size(max = 50, min = 1)
35 @Pattern(regexp = Constraints.WINDOWS_FILENAME_REGEX)
36 private String identifier;
37
38 @NotNull
39 private boolean opened;
40
41 @NotNull
42 private boolean reportPrinted;
43
44 @NotNull
45 private Date open;
46
47 private Date close;
48
49 @NotNull
50 private long cash;
51
52 @NotNull
53 private long cashAtClose;
54
55 @NotNull
56 private long grandTotal;
57
58 @NotNull
59 private long grandTotalRefund;
60
61 private Integer version;
62
63 private String cashRegisterName;
64
65 private String closedDayTreasurer;
66
67 @NotNull
68 @JournalDate
69 private Date modified;
70
71 }