2 package Koha
::Schema
::Result
::Aqbasket
;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Aqbasket
16 use base
'DBIx::Class::Core';
18 =head1 TABLE: C<aqbasket>
22 __PACKAGE__
->table("aqbasket");
57 datetime_undef_if_invalid: 1
63 datetime_undef_if_invalid: 1
79 =head2 booksellerinvoicenumber
118 extra: {list => ["ordering","receiving","cataloguing"]}
123 __PACKAGE__
->add_columns(
125 { data_type
=> "integer", is_auto_increment
=> 1, is_nullable
=> 0 },
127 { data_type
=> "varchar", is_nullable
=> 1, size
=> 50 },
129 { data_type
=> "longtext", is_nullable
=> 1 },
131 { data_type
=> "longtext", is_nullable
=> 1 },
133 { data_type
=> "integer", is_foreign_key
=> 1, is_nullable
=> 1 },
135 { data_type
=> "date", datetime_undef_if_invalid
=> 1, is_nullable
=> 1 },
137 { data_type
=> "date", datetime_undef_if_invalid
=> 1, is_nullable
=> 1 },
140 data_type
=> "integer",
146 { data_type
=> "varchar", is_nullable
=> 1, size
=> 10 },
147 "booksellerinvoicenumber",
148 { data_type
=> "longtext", is_nullable
=> 1 },
150 { data_type
=> "integer", is_foreign_key
=> 1, is_nullable
=> 1 },
152 { data_type
=> "varchar", is_nullable
=> 1, size
=> 10 },
154 { data_type
=> "varchar", is_nullable
=> 1, size
=> 10 },
156 { data_type
=> "varchar", is_foreign_key
=> 1, is_nullable
=> 1, size
=> 10 },
158 { data_type
=> "tinyint", default_value
=> 0, is_nullable
=> 0 },
162 extra
=> { list
=> ["ordering", "receiving", "cataloguing"] },
177 __PACKAGE__
->set_primary_key("basketno");
185 Related object: L<Koha::Schema::Result::Aqbasketuser>
189 __PACKAGE__
->has_many(
191 "Koha::Schema::Result::Aqbasketuser",
192 { "foreign.basketno" => "self.basketno" },
193 { cascade_copy
=> 0, cascade_delete
=> 0 },
200 Related object: L<Koha::Schema::Result::Aqorder>
204 __PACKAGE__
->has_many(
206 "Koha::Schema::Result::Aqorder",
207 { "foreign.basketno" => "self.basketno" },
208 { cascade_copy
=> 0, cascade_delete
=> 0 },
215 Related object: L<Koha::Schema::Result::Aqbasketgroup>
219 __PACKAGE__
->belongs_to(
221 "Koha::Schema::Result::Aqbasketgroup",
222 { id
=> "basketgroupid" },
226 on_delete
=> "RESTRICT",
227 on_update
=> "CASCADE",
235 Related object: L<Koha::Schema::Result::Aqbookseller>
239 __PACKAGE__
->belongs_to(
241 "Koha::Schema::Result::Aqbookseller",
242 { id
=> "booksellerid" },
243 { is_deferrable
=> 1, on_delete
=> "RESTRICT", on_update
=> "CASCADE" },
250 Related object: L<Koha::Schema::Result::Branch>
254 __PACKAGE__
->belongs_to(
256 "Koha::Schema::Result::Branch",
257 { branchcode
=> "branch" },
261 on_delete
=> "SET NULL",
262 on_update
=> "CASCADE",
266 =head2 contractnumber
270 Related object: L<Koha::Schema::Result::Aqcontract>
274 __PACKAGE__
->belongs_to(
276 "Koha::Schema::Result::Aqcontract",
277 { contractnumber
=> "contractnumber" },
281 on_delete
=> "RESTRICT",
282 on_update
=> "RESTRICT",
286 =head2 edifact_messages
290 Related object: L<Koha::Schema::Result::EdifactMessage>
294 __PACKAGE__
->has_many(
296 "Koha::Schema::Result::EdifactMessage",
297 { "foreign.basketno" => "self.basketno" },
298 { cascade_copy
=> 0, cascade_delete
=> 0 },
301 =head2 borrowernumbers
305 Composing rels: L</aqbasketusers> -> borrowernumber
309 __PACKAGE__
->many_to_many("borrowernumbers", "aqbasketusers", "borrowernumber");
312 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
313 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gSw/f4JmMBzEssEFRg2fAQ
315 __PACKAGE__
->has_many(
316 "additional_field_values",
317 "Koha::Schema::Result::AdditionalFieldValue",
322 "$args->{foreign_alias}.record_id" => { -ident
=> "$args->{self_alias}.basketno" },
324 "$args->{foreign_alias}.field_id" =>
325 { -in => \'(SELECT id FROM additional_fields WHERE tablename
= "aqbasket")' },
328 { cascade_copy => 0, cascade_delete => 0 },
331 __PACKAGE__->belongs_to(
333 "Koha::Schema::Result::Aqbasketgroup",
334 { 'foreign
.id
' => "self.basketgroupid" },
338 on_delete => "RESTRICT",
339 on_update => "CASCADE",
343 sub koha_object_class {
344 'Koha
::Acquisition
::Basket
';
346 sub koha_objects_class {
347 'Koha
::Acquisition
::Baskets
';
350 __PACKAGE__->add_columns(
351 '+is_standing
' => { is_boolean => 1 }