]>
Commit | Line | Data |
---|---|---|
4ed3f8e7 MG |
1 | use utf8; |
2 | package Gruntmaster::Data::Result::Problem; | |
3 | ||
4 | # Created by DBIx::Class::Schema::Loader | |
5 | # DO NOT MODIFY THE FIRST PART OF THIS FILE | |
6 | ||
7 | =head1 NAME | |
8 | ||
9 | Gruntmaster::Data::Result::Problem | |
10 | ||
11 | =cut | |
12 | ||
13 | use strict; | |
14 | use warnings; | |
15 | ||
16 | use base 'DBIx::Class::Core'; | |
17 | ||
18 | =head1 TABLE: C<problems> | |
19 | ||
20 | =cut | |
21 | ||
22 | __PACKAGE__->table("problems"); | |
23 | ||
24 | =head1 ACCESSORS | |
25 | ||
26 | =head2 id | |
27 | ||
28 | data_type: 'text' | |
29 | is_nullable: 0 | |
30 | ||
31 | =head2 author | |
32 | ||
33 | data_type: 'text' | |
34 | is_nullable: 0 | |
35 | ||
36 | =head2 generator | |
37 | ||
38 | data_type: 'enum' | |
39 | extra: {custom_type_name => "generator",list => ["File","Run","Undef"]} | |
40 | is_nullable: 0 | |
41 | ||
42 | =head2 judge | |
43 | ||
44 | data_type: 'enum' | |
45 | extra: {custom_type_name => "judge",list => ["Absolute","Points"]} | |
46 | is_nullable: 0 | |
47 | ||
48 | =head2 level | |
49 | ||
50 | data_type: 'enum' | |
51 | extra: {custom_type_name => "plevel",list => ["beginner","easy","medium","hard"]} | |
52 | is_nullable: 0 | |
53 | ||
54 | =head2 name | |
55 | ||
56 | data_type: 'text' | |
57 | is_nullable: 0 | |
58 | ||
59 | =head2 olimit | |
60 | ||
61 | data_type: 'integer' | |
62 | is_nullable: 1 | |
63 | ||
64 | =head2 owner | |
65 | ||
66 | data_type: 'text' | |
67 | is_foreign_key: 1 | |
68 | is_nullable: 0 | |
69 | ||
70 | =head2 private | |
71 | ||
72 | data_type: 'boolean' | |
73 | is_nullable: 0 | |
74 | ||
75 | =head2 runner | |
76 | ||
77 | data_type: 'enum' | |
78 | extra: {custom_type_name => "runner",list => ["File","Verifier","Interactive"]} | |
79 | is_nullable: 0 | |
80 | ||
81 | =head2 statement | |
82 | ||
83 | data_type: 'text' | |
84 | is_nullable: 0 | |
85 | ||
86 | =head2 testcnt | |
87 | ||
88 | data_type: 'integer' | |
89 | is_nullable: 0 | |
90 | ||
91 | =head2 timeout | |
92 | ||
93 | data_type: 'real' | |
94 | is_nullable: 0 | |
95 | ||
96 | =head2 value | |
97 | ||
98 | data_type: 'integer' | |
99 | is_nullable: 1 | |
100 | ||
101 | =head2 verformat | |
102 | ||
103 | data_type: 'text' | |
104 | is_nullable: 1 | |
105 | ||
106 | =head2 versource | |
107 | ||
108 | data_type: 'text' | |
109 | is_nullable: 1 | |
110 | ||
111 | =cut | |
112 | ||
113 | __PACKAGE__->add_columns( | |
114 | "id", | |
115 | { data_type => "text", is_nullable => 0 }, | |
116 | "author", | |
117 | { data_type => "text", is_nullable => 0 }, | |
118 | "generator", | |
119 | { | |
120 | data_type => "enum", | |
121 | extra => { custom_type_name => "generator", list => ["File", "Run", "Undef"] }, | |
122 | is_nullable => 0, | |
123 | }, | |
124 | "judge", | |
125 | { | |
126 | data_type => "enum", | |
127 | extra => { custom_type_name => "judge", list => ["Absolute", "Points"] }, | |
128 | is_nullable => 0, | |
129 | }, | |
130 | "level", | |
131 | { | |
132 | data_type => "enum", | |
133 | extra => { | |
134 | custom_type_name => "plevel", | |
135 | list => ["beginner", "easy", "medium", "hard"], | |
136 | }, | |
137 | is_nullable => 0, | |
138 | }, | |
139 | "name", | |
140 | { data_type => "text", is_nullable => 0 }, | |
141 | "olimit", | |
142 | { data_type => "integer", is_nullable => 1 }, | |
143 | "owner", | |
144 | { data_type => "text", is_foreign_key => 1, is_nullable => 0 }, | |
145 | "private", | |
146 | { data_type => "boolean", is_nullable => 0 }, | |
147 | "runner", | |
148 | { | |
149 | data_type => "enum", | |
150 | extra => { | |
151 | custom_type_name => "runner", | |
152 | list => ["File", "Verifier", "Interactive"], | |
153 | }, | |
154 | is_nullable => 0, | |
155 | }, | |
156 | "statement", | |
157 | { data_type => "text", is_nullable => 0 }, | |
158 | "testcnt", | |
159 | { data_type => "integer", is_nullable => 0 }, | |
160 | "timeout", | |
161 | { data_type => "real", is_nullable => 0 }, | |
162 | "value", | |
163 | { data_type => "integer", is_nullable => 1 }, | |
164 | "verformat", | |
165 | { data_type => "text", is_nullable => 1 }, | |
166 | "versource", | |
167 | { data_type => "text", is_nullable => 1 }, | |
168 | ); | |
169 | ||
170 | =head1 PRIMARY KEY | |
171 | ||
172 | =over 4 | |
173 | ||
174 | =item * L</id> | |
175 | ||
176 | =back | |
177 | ||
178 | =cut | |
179 | ||
180 | __PACKAGE__->set_primary_key("id"); | |
181 | ||
182 | =head1 RELATIONS | |
183 | ||
184 | =head2 contest_problems | |
185 | ||
186 | Type: has_many | |
187 | ||
188 | Related object: L<Gruntmaster::Data::Result::ContestProblem> | |
189 | ||
190 | =cut | |
191 | ||
192 | __PACKAGE__->has_many( | |
193 | "contest_problems", | |
194 | "Gruntmaster::Data::Result::ContestProblem", | |
195 | { "foreign.problem" => "self.id" }, | |
196 | { cascade_copy => 0, cascade_delete => 0 }, | |
197 | ); | |
198 | ||
199 | =head2 jobs | |
200 | ||
201 | Type: has_many | |
202 | ||
203 | Related object: L<Gruntmaster::Data::Result::Job> | |
204 | ||
205 | =cut | |
206 | ||
207 | __PACKAGE__->has_many( | |
208 | "jobs", | |
209 | "Gruntmaster::Data::Result::Job", | |
210 | { "foreign.problem" => "self.id" }, | |
211 | { cascade_copy => 0, cascade_delete => 0 }, | |
212 | ); | |
213 | ||
214 | =head2 opens | |
215 | ||
216 | Type: has_many | |
217 | ||
218 | Related object: L<Gruntmaster::Data::Result::Open> | |
219 | ||
220 | =cut | |
221 | ||
222 | __PACKAGE__->has_many( | |
223 | "opens", | |
224 | "Gruntmaster::Data::Result::Open", | |
225 | { "foreign.problem" => "self.id" }, | |
226 | { cascade_copy => 0, cascade_delete => 0 }, | |
227 | ); | |
228 | ||
229 | =head2 owner | |
230 | ||
231 | Type: belongs_to | |
232 | ||
233 | Related object: L<Gruntmaster::Data::Result::User> | |
234 | ||
235 | =cut | |
236 | ||
237 | __PACKAGE__->belongs_to( | |
238 | "owner", | |
239 | "Gruntmaster::Data::Result::User", | |
240 | { id => "owner" }, | |
241 | { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" }, | |
242 | ); | |
243 | ||
244 | =head2 contests | |
245 | ||
246 | Type: many_to_many | |
247 | ||
248 | Composing rels: L</contest_problems> -> contest | |
249 | ||
250 | =cut | |
251 | ||
252 | __PACKAGE__->many_to_many("contests", "contest_problems", "contest"); | |
253 | ||
254 | ||
255 | # Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-03-06 12:41:16 | |
256 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:y1LUGcxNJxUMgMXqvAkKYQ | |
257 | ||
258 | ||
259 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | |
260 | 1; |