57c305c1 |
1 | signature POLL = sig |
2 | type poll = {id : int, usr : int, title : string, descr : string, starts : string, ends : string, votes : int} |
3 | |
4 | val lookupPoll : int -> poll |
5 | val listPolls : unit -> poll list |
6 | val listPollsLimit : int -> poll list |
7 | |
8 | val addPoll : int * string * string * string * string * int -> int |
9 | val modPoll : poll -> unit |
10 | val deletePoll : int -> unit |
11 | |
12 | type choice = {id : int, pol : int, seq : real, descr : string} |
13 | |
14 | val lookupChoice : int -> choice |
15 | val addChoice : int * real * string -> int |
16 | val modChoice : choice -> unit |
17 | val deleteChoice : int -> unit |
18 | val listChoices : int -> choice list |
19 | |
20 | val vote : int * int * int list -> unit |
21 | |
22 | val dateLe : string * string -> bool |
23 | val dateGeNow : string -> bool |
24 | val dateLtNow : string -> bool |
25 | |
26 | val canModify : poll -> bool |
27 | val requireCanModify : poll -> unit |
28 | |
29 | val nextSeq : int -> real |
30 | end |