-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRatingTable.pm
More file actions
60 lines (58 loc) · 1.25 KB
/
RatingTable.pm
File metadata and controls
60 lines (58 loc) · 1.25 KB
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
# Copyright(c) 2003-2007 Robert L. Brown. This is licensed software
# only to be used with an explicit right-to-use license from the
# copyright holder.
use UserTable;
use CandidateTable;
%::RatingTable = (
table => "rating",
heading => "Ratings",
columns => [
{
column => "id",
heading => "Id",
type => "pk",
},
{
column => "creation",
heading => "Creation",
type => "datetime",
},
{
column => "rating",
heading => "Rating 0..10",
type => "float",
validators => [
[ 'emptyOK' ],
[ 'float' ],
[ 'range', [0, 10] ],
],
},
{
column => "comment",
heading => "Short Comment",
type => "text",
width => "100",
},
{
column => "candidate_id",
heading => "Candidate",
type => "fk",
values => {
table => \%::CandidateTable,
pk => "id",
label => "name",
},
},
{
column => "user_id",
heading => "User",
type => "fk",
values => {
table => \%::UserTable,
pk => "id",
label => "name",
},
},
],
);
1;