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