-
Notifications
You must be signed in to change notification settings - Fork 6
/
StandardObjects.dsl
52 lines (52 loc) · 1.24 KB
/
StandardObjects.dsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
module StandardObjects {
value DeletePost {
int postID;
guid? referenceId;
timestamp lastModified {
//otherwise we will get current timestamp
default c# 'System.DateTime.MinValue';
default Java 'com.dslplatform.json.JavaTimeConverter.MIN_DATE_TIME_UTC';
}
long deletedBy;
string? reason;
long[]? versions; //Issue: ProtoBuf doesn't differentiate empty array from null
PostState? state;
list<bool?>? votes; //Issue: list<bool?> required Protobuf modification
}
enum PostState {
Draft;
Published;
Hidden;
}
value Post {
int ID;
string title;
string text;
date created {
//otherwise we will get current date
default c# 'System.DateTime.MinValue';
default Java 'com.dslplatform.json.JavaTimeConverter.MIN_LOCAL_DATE';
}
Set<string> tags;
timestamp? approved;
List<Comment> comments;
Vote votes;
List<string>? notes;
PostState state;
}
value Comment {
date created {
//otherwise we will get current date
default c# 'System.DateTime.MinValue';
default Java 'com.dslplatform.json.JavaTimeConverter.MIN_LOCAL_DATE';
}
timestamp? approved;
string? user;
string message;
Vote votes;
}
value Vote {
int upvote;
int downvote;
}
}