Bug 7295: (follow-up) update DBIx::Class schema classes
[koha.git] / Koha / Schema / Result / Aqbasket.pm
1 use utf8;
2 package Koha::Schema::Result::Aqbasket;
3
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7 =head1 NAME
8
9 Koha::Schema::Result::Aqbasket
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<aqbasket>
19
20 =cut
21
22 __PACKAGE__->table("aqbasket");
23
24 =head1 ACCESSORS
25
26 =head2 basketno
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 basketname
33
34   data_type: 'varchar'
35   is_nullable: 1
36   size: 50
37
38 =head2 note
39
40   data_type: 'mediumtext'
41   is_nullable: 1
42
43 =head2 booksellernote
44
45   data_type: 'mediumtext'
46   is_nullable: 1
47
48 =head2 contractnumber
49
50   data_type: 'integer'
51   is_foreign_key: 1
52   is_nullable: 1
53
54 =head2 creationdate
55
56   data_type: 'date'
57   datetime_undef_if_invalid: 1
58   is_nullable: 1
59
60 =head2 closedate
61
62   data_type: 'date'
63   datetime_undef_if_invalid: 1
64   is_nullable: 1
65
66 =head2 booksellerid
67
68   data_type: 'integer'
69   default_value: 1
70   is_foreign_key: 1
71   is_nullable: 0
72
73 =head2 authorisedby
74
75   data_type: 'varchar'
76   is_nullable: 1
77   size: 10
78
79 =head2 booksellerinvoicenumber
80
81   data_type: 'mediumtext'
82   is_nullable: 1
83
84 =head2 basketgroupid
85
86   data_type: 'integer'
87   is_foreign_key: 1
88   is_nullable: 1
89
90 =head2 deliveryplace
91
92   data_type: 'varchar'
93   is_nullable: 1
94   size: 10
95
96 =head2 billingplace
97
98   data_type: 'varchar'
99   is_nullable: 1
100   size: 10
101
102 =head2 branch
103
104   data_type: 'varchar'
105   is_foreign_key: 1
106   is_nullable: 1
107   size: 10
108
109 =cut
110
111 __PACKAGE__->add_columns(
112   "basketno",
113   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
114   "basketname",
115   { data_type => "varchar", is_nullable => 1, size => 50 },
116   "note",
117   { data_type => "mediumtext", is_nullable => 1 },
118   "booksellernote",
119   { data_type => "mediumtext", is_nullable => 1 },
120   "contractnumber",
121   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
122   "creationdate",
123   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
124   "closedate",
125   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
126   "booksellerid",
127   {
128     data_type      => "integer",
129     default_value  => 1,
130     is_foreign_key => 1,
131     is_nullable    => 0,
132   },
133   "authorisedby",
134   { data_type => "varchar", is_nullable => 1, size => 10 },
135   "booksellerinvoicenumber",
136   { data_type => "mediumtext", is_nullable => 1 },
137   "basketgroupid",
138   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
139   "deliveryplace",
140   { data_type => "varchar", is_nullable => 1, size => 10 },
141   "billingplace",
142   { data_type => "varchar", is_nullable => 1, size => 10 },
143   "branch",
144   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
145 );
146
147 =head1 PRIMARY KEY
148
149 =over 4
150
151 =item * L</basketno>
152
153 =back
154
155 =cut
156
157 __PACKAGE__->set_primary_key("basketno");
158
159 =head1 RELATIONS
160
161 =head2 aqbasketusers
162
163 Type: has_many
164
165 Related object: L<Koha::Schema::Result::Aqbasketuser>
166
167 =cut
168
169 __PACKAGE__->has_many(
170   "aqbasketusers",
171   "Koha::Schema::Result::Aqbasketuser",
172   { "foreign.basketno" => "self.basketno" },
173   { cascade_copy => 0, cascade_delete => 0 },
174 );
175
176 =head2 aqorders
177
178 Type: has_many
179
180 Related object: L<Koha::Schema::Result::Aqorder>
181
182 =cut
183
184 __PACKAGE__->has_many(
185   "aqorders",
186   "Koha::Schema::Result::Aqorder",
187   { "foreign.basketno" => "self.basketno" },
188   { cascade_copy => 0, cascade_delete => 0 },
189 );
190
191 =head2 basketgroupid
192
193 Type: belongs_to
194
195 Related object: L<Koha::Schema::Result::Aqbasketgroup>
196
197 =cut
198
199 __PACKAGE__->belongs_to(
200   "basketgroupid",
201   "Koha::Schema::Result::Aqbasketgroup",
202   { id => "basketgroupid" },
203   {
204     is_deferrable => 1,
205     join_type     => "LEFT",
206     on_delete     => "CASCADE",
207     on_update     => "CASCADE",
208   },
209 );
210
211 =head2 booksellerid
212
213 Type: belongs_to
214
215 Related object: L<Koha::Schema::Result::Aqbookseller>
216
217 =cut
218
219 __PACKAGE__->belongs_to(
220   "booksellerid",
221   "Koha::Schema::Result::Aqbookseller",
222   { id => "booksellerid" },
223   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
224 );
225
226 =head2 branch
227
228 Type: belongs_to
229
230 Related object: L<Koha::Schema::Result::Branch>
231
232 =cut
233
234 __PACKAGE__->belongs_to(
235   "branch",
236   "Koha::Schema::Result::Branch",
237   { branchcode => "branch" },
238   {
239     is_deferrable => 1,
240     join_type     => "LEFT",
241     on_delete     => "CASCADE",
242     on_update     => "CASCADE",
243   },
244 );
245
246 =head2 contractnumber
247
248 Type: belongs_to
249
250 Related object: L<Koha::Schema::Result::Aqcontract>
251
252 =cut
253
254 __PACKAGE__->belongs_to(
255   "contractnumber",
256   "Koha::Schema::Result::Aqcontract",
257   { contractnumber => "contractnumber" },
258   {
259     is_deferrable => 1,
260     join_type     => "LEFT",
261     on_delete     => "CASCADE",
262     on_update     => "CASCADE",
263   },
264 );
265
266 =head2 borrowernumbers
267
268 Type: many_to_many
269
270 Composing rels: L</aqbasketusers> -> borrowernumber
271
272 =cut
273
274 __PACKAGE__->many_to_many("borrowernumbers", "aqbasketusers", "borrowernumber");
275
276
277 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-31 16:31:18
278 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TCssMGPEqtE0MZ5INCufoA
279
280
281 # You can replace this text with custom content, and it will be preserved on regeneration
282 1;