-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample_input.mdo
More file actions
46 lines (32 loc) · 909 Bytes
/
sample_input.mdo
File metadata and controls
46 lines (32 loc) · 909 Bytes
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
package com.hapticapps.amici.shared.data_models.org;
import com.hapticapps.amici.shared.utils.Utils;
import org.bson.codecs.pojo.annotations.BsonProperty;
/**
The org person
**/
entity OrgPerson {
index (uuid asc) unique;
index (name asc) unique;
index (email asc) unique sparse;
index (friendIds asc) sparse;
data String uuid as u = ~Utils.newUID()~;
data String orgId as o;
data String name as n;
data String email as e;
data Status status as st = ~Status.PENDING~;
data ~List<String>~ friendIds as f = ~new ArrayList<>()~;
data ~List<Address>~ addresses as a = ~new ArrayList<>()~;
show (orgId, name, email);
}
enum Status {
PENDING, ACTIVE, UNREGISTERED
}
class Address {
data String city as ct;
data String state as st;
data String zip;
data AddressType addressType as at;
}
enum AddressType {
PRIMARY, SECONDARY
}