Add problem_status, contest_status and a method that updates them
[gruntmaster-data.git] / lib / Gruntmaster / Data / Result / ProblemStatus.pm
1 use utf8;
2 package Gruntmaster::Data::Result::ProblemStatus;
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::ProblemStatus
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<problem_status>
19
20 =cut
21
22 __PACKAGE__->table("problem_status");
23
24 =head1 ACCESSORS
25
26 =head2 problem
27
28 data_type: 'text'
29 is_foreign_key: 1
30 is_nullable: 0
31
32 =head2 owner
33
34 data_type: 'text'
35 is_foreign_key: 1
36 is_nullable: 0
37
38 =head2 job
39
40 data_type: 'integer'
41 is_auto_increment: 1
42 is_foreign_key: 1
43 is_nullable: 0
44 sequence: 'problem_status_job_seq'
45
46 =head2 solved
47
48 data_type: 'boolean'
49 default_value: false
50 is_nullable: 0
51
52 =cut
53
54 __PACKAGE__->add_columns(
55 "problem",
56 { data_type => "text", is_foreign_key => 1, is_nullable => 0 },
57 "owner",
58 { data_type => "text", is_foreign_key => 1, is_nullable => 0 },
59 "job",
60 {
61 data_type => "integer",
62 is_auto_increment => 1,
63 is_foreign_key => 1,
64 is_nullable => 0,
65 sequence => "problem_status_job_seq",
66 },
67 "solved",
68 { data_type => "boolean", default_value => \"false", is_nullable => 0 },
69 );
70
71 =head1 PRIMARY KEY
72
73 =over 4
74
75 =item * L</owner>
76
77 =item * L</problem>
78
79 =back
80
81 =cut
82
83 __PACKAGE__->set_primary_key("owner", "problem");
84
85 =head1 RELATIONS
86
87 =head2 job
88
89 Type: belongs_to
90
91 Related object: L<Gruntmaster::Data::Result::Job>
92
93 =cut
94
95 __PACKAGE__->belongs_to(
96 "job",
97 "Gruntmaster::Data::Result::Job",
98 { id => "job" },
99 { is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" },
100 );
101
102 =head2 owner
103
104 Type: belongs_to
105
106 Related object: L<Gruntmaster::Data::Result::User>
107
108 =cut
109
110 __PACKAGE__->belongs_to(
111 "owner",
112 "Gruntmaster::Data::Result::User",
113 { id => "owner" },
114 { is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" },
115 );
116
117 =head2 problem
118
119 Type: belongs_to
120
121 Related object: L<Gruntmaster::Data::Result::Problem>
122
123 =cut
124
125 __PACKAGE__->belongs_to(
126 "problem",
127 "Gruntmaster::Data::Result::Problem",
128 { id => "problem" },
129 { is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" },
130 );
131
132
133 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-11 23:51:27
134 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SUAwYQhgBtoCjtFSOMc4FQ
135
136
137 # You can replace this text with custom code or comments, and it will be preserved on regeneration
138 1;
This page took 0.024524 seconds and 4 git commands to generate.