Increment version for 3.22.6 release
[koha.git] / Koha / Schema / Result / Branchrelation.pm
blobe44412b59aea421bd719663c052b13166f46a659
1 use utf8;
2 package Koha::Schema::Result::Branchrelation;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Branchrelation
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<branchrelations>
20 =cut
22 __PACKAGE__->table("branchrelations");
24 =head1 ACCESSORS
26 =head2 branchcode
28 data_type: 'varchar'
29 default_value: (empty string)
30 is_foreign_key: 1
31 is_nullable: 0
32 size: 10
34 =head2 categorycode
36 data_type: 'varchar'
37 default_value: (empty string)
38 is_foreign_key: 1
39 is_nullable: 0
40 size: 10
42 =cut
44 __PACKAGE__->add_columns(
45 "branchcode",
47 data_type => "varchar",
48 default_value => "",
49 is_foreign_key => 1,
50 is_nullable => 0,
51 size => 10,
53 "categorycode",
55 data_type => "varchar",
56 default_value => "",
57 is_foreign_key => 1,
58 is_nullable => 0,
59 size => 10,
63 =head1 PRIMARY KEY
65 =over 4
67 =item * L</branchcode>
69 =item * L</categorycode>
71 =back
73 =cut
75 __PACKAGE__->set_primary_key("branchcode", "categorycode");
77 =head1 RELATIONS
79 =head2 branchcode
81 Type: belongs_to
83 Related object: L<Koha::Schema::Result::Branch>
85 =cut
87 __PACKAGE__->belongs_to(
88 "branchcode",
89 "Koha::Schema::Result::Branch",
90 { branchcode => "branchcode" },
91 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
94 =head2 categorycode
96 Type: belongs_to
98 Related object: L<Koha::Schema::Result::Branchcategory>
100 =cut
102 __PACKAGE__->belongs_to(
103 "categorycode",
104 "Koha::Schema::Result::Branchcategory",
105 { categorycode => "categorycode" },
106 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
110 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
111 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lBOq8k+wurbp633kbi8tVg
114 # You can replace this text with custom content, and it will be preserved on regeneration