]>
Commit | Line | Data |
---|---|---|
adb42d4d MG |
1 | use utf8; |
2 | package Gruntmaster::Data::Result::ContestStatus; | |
3 | ||
4 | # Created by DBIx::Class::Schema::Loader | |
5 | # DO NOT MODIFY THE FIRST PART OF THIS FILE | |
6 | ||
7 | =head1 NAME | |
8 | ||
be2f7678 | 9 | Gruntmaster::Data::Result::ContestStatus - List of (contest, user, result) |
adb42d4d MG |
10 | |
11 | =cut | |
12 | ||
13 | use strict; | |
14 | use warnings; | |
15 | ||
16 | use base 'DBIx::Class::Core'; | |
17 | ||
18 | =head1 TABLE: C<contest_status> | |
19 | ||
20 | =cut | |
21 | ||
22 | __PACKAGE__->table("contest_status"); | |
23 | ||
24 | =head1 ACCESSORS | |
25 | ||
26 | =head2 contest | |
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 score | |
39 | ||
40 | data_type: 'integer' | |
41 | is_nullable: 0 | |
42 | ||
43 | =head2 rank | |
44 | ||
45 | data_type: 'integer' | |
46 | is_nullable: 0 | |
47 | ||
48 | =cut | |
49 | ||
50 | __PACKAGE__->add_columns( | |
51 | "contest", | |
52 | { data_type => "text", is_foreign_key => 1, is_nullable => 0 }, | |
53 | "owner", | |
54 | { data_type => "text", is_foreign_key => 1, is_nullable => 0 }, | |
55 | "score", | |
56 | { data_type => "integer", is_nullable => 0 }, | |
57 | "rank", | |
58 | { data_type => "integer", is_nullable => 0 }, | |
59 | ); | |
60 | ||
61 | =head1 PRIMARY KEY | |
62 | ||
63 | =over 4 | |
64 | ||
65 | =item * L</owner> | |
66 | ||
67 | =item * L</contest> | |
68 | ||
69 | =back | |
70 | ||
71 | =cut | |
72 | ||
73 | __PACKAGE__->set_primary_key("owner", "contest"); | |
74 | ||
75 | =head1 RELATIONS | |
76 | ||
77 | =head2 contest | |
78 | ||
79 | Type: belongs_to | |
80 | ||
81 | Related object: L<Gruntmaster::Data::Result::Contest> | |
82 | ||
83 | =cut | |
84 | ||
85 | __PACKAGE__->belongs_to( | |
86 | "contest", | |
87 | "Gruntmaster::Data::Result::Contest", | |
88 | { id => "contest" }, | |
89 | { is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" }, | |
90 | ); | |
91 | ||
92 | =head2 owner | |
93 | ||
94 | Type: belongs_to | |
95 | ||
96 | Related object: L<Gruntmaster::Data::Result::User> | |
97 | ||
98 | =cut | |
99 | ||
100 | __PACKAGE__->belongs_to( | |
101 | "owner", | |
102 | "Gruntmaster::Data::Result::User", | |
103 | { id => "owner" }, | |
104 | { is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" }, | |
105 | ); | |
106 | ||
107 | ||
be2f7678 MG |
108 | # Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-19 16:44:22 |
109 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IkY4FNON0SrxrP8oNOXoHg | |
adb42d4d | 110 | |
c9311d50 | 111 | sub rawowner { shift->get_column('owner') } |
adb42d4d | 112 | |
adb42d4d | 113 | 1; |