Skip to content

Commit a98fc05

Browse files
committed
feat(submitted-form): Add Dates to model.
1 parent e37c34b commit a98fc05

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

FormitizeAPI/API/Model/SubmittedForm.cs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,48 @@ public bool Append
5151
get; set;
5252
}
5353

54+
[JsonProperty(PropertyName = "dateSubmitted")]
55+
public int DateSubmittedUnixTimestamp
56+
{
57+
get; private set;
58+
}
59+
60+
public DateTime DateSubmitted
61+
{
62+
get
63+
{
64+
return new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(DateSubmittedUnixTimestamp);
65+
}
66+
}
67+
68+
[JsonProperty(PropertyName = "dateModified")]
69+
public int DateModifiedUnixTimestamp
70+
{
71+
get; private set;
72+
}
73+
74+
public DateTime DateModified
75+
{
76+
get
77+
{
78+
return new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(DateModifiedUnixTimestamp);
79+
}
80+
}
81+
82+
[JsonProperty(PropertyName = "dateCreated")]
83+
public int DateCreatedUnixTimestamp
84+
{
85+
get; private set;
86+
}
87+
88+
public DateTime DateCreated
89+
{
90+
get
91+
{
92+
return new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(DateCreatedUnixTimestamp);
93+
}
94+
}
95+
5496
public SubmittedForm()
5597
{
5698
content = new Dictionary<string, Dictionary<string, object>>();

0 commit comments

Comments
 (0)