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