f4dd75d68efec51cfe7e32654930ed54357477a1
[koha-ffzg.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 =head2 is_standing
110
111   data_type: 'tinyint'
112   default_value: 0
113   is_nullable: 0
114
115 =cut
116
117 __PACKAGE__->add_columns(
118   "basketno",
119   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
120   "basketname",
121   { data_type => "varchar", is_nullable => 1, size => 50 },
122   "note",
123   { data_type => "mediumtext", is_nullable => 1 },
124   "booksellernote",
125   { data_type => "mediumtext", is_nullable => 1 },
126   "contractnumber",
127   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
128   "creationdate",
129   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
130   "closedate",
131   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
132   "booksellerid",
133   {
134     data_type      => "integer",
135     default_value  => 1,
136     is_foreign_key => 1,
137     is_nullable    => 0,
138   },
139   "authorisedby",
140   { data_type => "varchar", is_nullable => 1, size => 10 },
141   "booksellerinvoicenumber",
142   { data_type => "mediumtext", is_nullable => 1 },
143   "basketgroupid",
144   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
145   "deliveryplace",
146   { data_type => "varchar", is_nullable => 1, size => 10 },
147   "billingplace",
148   { data_type => "varchar", is_nullable => 1, size => 10 },
149   "branch",
150   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
151   "is_standing",
152   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
153 );
154
155 =head1 PRIMARY KEY
156
157 =over 4
158
159 =item * L</basketno>
160
161 =back
162
163 =cut
164
165 __PACKAGE__->set_primary_key("basketno");
166
167 =head1 RELATIONS
168
169 =head2 aqbasketusers
170
171 Type: has_many
172
173 Related object: L<Koha::Schema::Result::Aqbasketuser>
174
175 =cut
176
177 __PACKAGE__->has_many(
178   "aqbasketusers",
179   "Koha::Schema::Result::Aqbasketuser",
180   { "foreign.basketno" => "self.basketno" },
181   { cascade_copy => 0, cascade_delete => 0 },
182 );
183
184 =head2 aqorders
185
186 Type: has_many
187
188 Related object: L<Koha::Schema::Result::Aqorder>
189
190 =cut
191
192 __PACKAGE__->has_many(
193   "aqorders",
194   "Koha::Schema::Result::Aqorder",
195   { "foreign.basketno" => "self.basketno" },
196   { cascade_copy => 0, cascade_delete => 0 },
197 );
198
199 =head2 basketgroupid
200
201 Type: belongs_to
202
203 Related object: L<Koha::Schema::Result::Aqbasketgroup>
204
205 =cut
206
207 __PACKAGE__->belongs_to(
208   "basketgroupid",
209   "Koha::Schema::Result::Aqbasketgroup",
210   { id => "basketgroupid" },
211   {
212     is_deferrable => 1,
213     join_type     => "LEFT",
214     on_delete     => "RESTRICT",
215     on_update     => "CASCADE",
216   },
217 );
218
219 =head2 booksellerid
220
221 Type: belongs_to
222
223 Related object: L<Koha::Schema::Result::Aqbookseller>
224
225 =cut
226
227 __PACKAGE__->belongs_to(
228   "booksellerid",
229   "Koha::Schema::Result::Aqbookseller",
230   { id => "booksellerid" },
231   { is_deferrable => 1, on_delete => "RESTRICT", on_update => "CASCADE" },
232 );
233
234 =head2 branch
235
236 Type: belongs_to
237
238 Related object: L<Koha::Schema::Result::Branch>
239
240 =cut
241
242 __PACKAGE__->belongs_to(
243   "branch",
244   "Koha::Schema::Result::Branch",
245   { branchcode => "branch" },
246   {
247     is_deferrable => 1,
248     join_type     => "LEFT",
249     on_delete     => "SET NULL",
250     on_update     => "CASCADE",
251   },
252 );
253
254 =head2 contractnumber
255
256 Type: belongs_to
257
258 Related object: L<Koha::Schema::Result::Aqcontract>
259
260 =cut
261
262 __PACKAGE__->belongs_to(
263   "contractnumber",
264   "Koha::Schema::Result::Aqcontract",
265   { contractnumber => "contractnumber" },
266   {
267     is_deferrable => 1,
268     join_type     => "LEFT",
269     on_delete     => "RESTRICT",
270     on_update     => "RESTRICT",
271   },
272 );
273
274 =head2 edifact_messages
275
276 Type: has_many
277
278 Related object: L<Koha::Schema::Result::EdifactMessage>
279
280 =cut
281
282 __PACKAGE__->has_many(
283   "edifact_messages",
284   "Koha::Schema::Result::EdifactMessage",
285   { "foreign.basketno" => "self.basketno" },
286   { cascade_copy => 0, cascade_delete => 0 },
287 );
288
289 =head2 borrowernumbers
290
291 Type: many_to_many
292
293 Composing rels: L</aqbasketusers> -> borrowernumber
294
295 =cut
296
297 __PACKAGE__->many_to_many("borrowernumbers", "aqbasketusers", "borrowernumber");
298
299
300 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-04-29 13:13:55
301 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6gRJtrZ6ZXLHjqX281d9Hg
302
303
304 # You can replace this text with custom code or comments, and it will be preserved on regeneration
305 1;