]> git.donarmstrong.com Git - debbugs.git/blob - lib/Debbugs/DB/Result/BinAssociation.pm
move Debbugs to lib
[debbugs.git] / lib / Debbugs / DB / Result / BinAssociation.pm
1 use utf8;
2 package Debbugs::DB::Result::BinAssociation;
3
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7 =head1 NAME
8
9 Debbugs::DB::Result::BinAssociation - Binary <-> suite associations
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 COMPONENTS LOADED
19
20 =over 4
21
22 =item * L<DBIx::Class::InflateColumn::DateTime>
23
24 =item * L<DBIx::Class::TimeStamp>
25
26 =back
27
28 =cut
29
30 __PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
31
32 =head1 TABLE: C<bin_associations>
33
34 =cut
35
36 __PACKAGE__->table("bin_associations");
37
38 =head1 ACCESSORS
39
40 =head2 id
41
42   data_type: 'integer'
43   is_auto_increment: 1
44   is_nullable: 0
45   sequence: 'bin_associations_id_seq'
46
47 Binary <-> suite association id
48
49 =head2 suite
50
51   data_type: 'integer'
52   is_foreign_key: 1
53   is_nullable: 0
54
55 Suite id (matches suite)
56
57 =head2 bin
58
59   data_type: 'integer'
60   is_foreign_key: 1
61   is_nullable: 0
62
63 Binary version id (matches bin_ver)
64
65 =head2 created
66
67   data_type: 'timestamp with time zone'
68   default_value: current_timestamp
69   is_nullable: 0
70   original: {default_value => \"now()"}
71
72 Time this binary package entered this suite
73
74 =head2 modified
75
76   data_type: 'timestamp with time zone'
77   default_value: current_timestamp
78   is_nullable: 0
79   original: {default_value => \"now()"}
80
81 Time this entry was modified
82
83 =cut
84
85 __PACKAGE__->add_columns(
86   "id",
87   {
88     data_type         => "integer",
89     is_auto_increment => 1,
90     is_nullable       => 0,
91     sequence          => "bin_associations_id_seq",
92   },
93   "suite",
94   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
95   "bin",
96   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
97   "created",
98   {
99     data_type     => "timestamp with time zone",
100     default_value => \"current_timestamp",
101     is_nullable   => 0,
102     original      => { default_value => \"now()" },
103   },
104   "modified",
105   {
106     data_type     => "timestamp with time zone",
107     default_value => \"current_timestamp",
108     is_nullable   => 0,
109     original      => { default_value => \"now()" },
110   },
111 );
112
113 =head1 PRIMARY KEY
114
115 =over 4
116
117 =item * L</id>
118
119 =back
120
121 =cut
122
123 __PACKAGE__->set_primary_key("id");
124
125 =head1 UNIQUE CONSTRAINTS
126
127 =head2 C<bin_associations_bin_suite>
128
129 =over 4
130
131 =item * L</bin>
132
133 =item * L</suite>
134
135 =back
136
137 =cut
138
139 __PACKAGE__->add_unique_constraint("bin_associations_bin_suite", ["bin", "suite"]);
140
141 =head1 RELATIONS
142
143 =head2 bin
144
145 Type: belongs_to
146
147 Related object: L<Debbugs::DB::Result::BinVer>
148
149 =cut
150
151 __PACKAGE__->belongs_to(
152   "bin",
153   "Debbugs::DB::Result::BinVer",
154   { id => "bin" },
155   { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
156 );
157
158 =head2 suite
159
160 Type: belongs_to
161
162 Related object: L<Debbugs::DB::Result::Suite>
163
164 =cut
165
166 __PACKAGE__->belongs_to(
167   "suite",
168   "Debbugs::DB::Result::Suite",
169   { id => "suite" },
170   { is_deferrable => 0, on_delete => "CASCADE", on_update => "CASCADE" },
171 );
172
173
174 # Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-11-24 09:00:00
175 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3F77iWjlJrHs/98TOfroAA
176
177
178 # You can replace this text with custom code or comments, and it will be preserved on regeneration
179 1;