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