This repository was archived by the owner on Apr 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel.rkt
79 lines (68 loc) · 2.53 KB
/
model.rkt
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
#lang racket
(provide (struct-out Addr)
(struct-out Host)
(struct-out Meeting)
MeetingFormat?
(struct-out Photo)
(struct-out Speaker)
(struct-out Link)
(struct-out Talk))
(require (prefix-in url: net/url))
(require (prefix-in g: gregor)
(prefix-in g: gregor/time))
(struct/contract Addr
([building string?]
[street string?]
[room string?]
[town string?]
[state "NH"]
[zipcode string?]
[country "USA"]
; XXX Generating these URLs requires an API key
; and potentially costs, but making them manually is free.
[google-maps-embed-url url:url?]))
; TODO Rename to a more general "member"? else?
(struct/contract Speaker
([id string?]
[name string?]
[email string?]
[email-show? boolean?]
[website (or/c #f url:url?)]
[affiliated-links (listof url:url?)]))
(struct/contract Host
([id string?]
[name string?]
[addr Addr?]
[url url:url?]
[contact Speaker?]))
; TODO Replace Speaker? copies with references by Speaker-id.
(struct/contract Link
([name (or/c #f string?)]
[url url:url?]))
(struct/contract Photo
([data bytes?]
[caption string?]))
(struct/contract Talk
([speaker Speaker?]
[title string?]
[description string?]
[website (or/c #f url:url?)]
[artifacts (listof Link?)] ; XXX We really should not allow this to be empty.
[references (listof Link?)]))
(define MeetingFormat? (or/c 'meet-and-greet
'show-and-tell
'problem-share
'talk))
(struct/contract Meeting
; TODO Model attendees.
([seq integer?]
[format MeetingFormat?]
[codename string?]
[date g:date?]
[time g:time?]
[host Host?]
[organizer Speaker?] ; HBIC of arrangements, promotion and logging.
[talks (listof Talk?)]
[recap string?]
[photos (listof Photo?)]
[registration-url url:url?]))