-
Notifications
You must be signed in to change notification settings - Fork 0
/
swarm_schema.hrl
101 lines (74 loc) · 1.37 KB
/
swarm_schema.hrl
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
%% @author J.R. Bedard <jrbedard@gmail.com>
%% @copyright 2008 jrbedard.
%% @doc Swarm Mnesia Schema.
%% city/lgn/lat mappings
-record(city, {id,
name,
lat,
lgn}).
%% SWARM records
-record(person, {id,
name,
password,
online,
status,
image_url,
bio,
website,
karma,
location,
event}).
-record(location, {id,
name,
type,
image_url,
description,
private,
lgn,
lat,
address,
website,
rating}).
-record(event, {id,
name,
type,
image_url,
description,
date_start,
date_end,
website,
rating}).
%% Person somewhere real-time
-record(p_at_loc, {person,
datetime,
lat,
lgn,
loc_id,
e_id}).
%% Person historic
-record(p_wasat_loc, {person,
datetime,
lat,
lgn,
loc_id,
e_id}).
%% Event somewhere
-record(e_at_loc, {event,
datetime,
lat,
lgn,
loc_id}).
%% todo: was
%% Image of something
-record(img_at_loc, {image_url,
lat,
lgn,
loc_id,
e_id}).
%% Favorites
-record(p_fav_p, {person,
p_id}).
-record(p_fav_loc, {person,
loc_id}).
-record(p_fav_e, {person,
e_id}).