View | Details | Raw Unified | Return to bug 15707
Collapse All | Expand All

(-)a/Koha/Schema/Result/Branch.pm (-2 / +17 lines)
Lines 525-530 __PACKAGE__->has_many( Link Here
525
  { cascade_copy => 0, cascade_delete => 0 },
525
  { cascade_copy => 0, cascade_delete => 0 },
526
);
526
);
527
527
528
=head2 library_groups
529
530
Type: has_many
531
532
Related object: L<Koha::Schema::Result::LibraryGroup>
533
534
=cut
535
536
__PACKAGE__->has_many(
537
  "library_groups",
538
  "Koha::Schema::Result::LibraryGroup",
539
  { "foreign.branchcode" => "self.branchcode" },
540
  { cascade_copy => 0, cascade_delete => 0 },
541
);
542
528
=head2 opac_news
543
=head2 opac_news
529
544
530
Type: has_many
545
Type: has_many
Lines 596-603 Composing rels: L</branchrelations> -> categorycode Link Here
596
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
611
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
597
612
598
613
599
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-04-26 16:17:25
614
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-11-02 13:23:16
600
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:99U1YQ4iSum4LbBha4hDTQ
615
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/kNNkq3bkqqg3fzTuYekFQ
601
616
602
617
603
# You can replace this text with custom code or comments, and it will be preserved on regeneration
618
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/LibraryGroup.pm (-1 / +170 lines)
Line 0 Link Here
0
- 
1
use utf8;
2
package Koha::Schema::Result::LibraryGroup;
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::LibraryGroup
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<library_groups>
19
20
=cut
21
22
__PACKAGE__->table("library_groups");
23
24
=head1 ACCESSORS
25
26
=head2 id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 parent_id
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 1
37
38
=head2 branchcode
39
40
  data_type: 'varchar'
41
  is_foreign_key: 1
42
  is_nullable: 1
43
  size: 10
44
45
=head2 title
46
47
  data_type: 'varchar'
48
  is_nullable: 1
49
  size: 100
50
51
=head2 description
52
53
  data_type: 'text'
54
  is_nullable: 1
55
56
=head2 created_on
57
58
  data_type: 'datetime'
59
  datetime_undef_if_invalid: 1
60
  is_nullable: 0
61
62
=head2 updated_on
63
64
  data_type: 'datetime'
65
  datetime_undef_if_invalid: 1
66
  is_nullable: 1
67
68
=cut
69
70
__PACKAGE__->add_columns(
71
  "id",
72
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
73
  "parent_id",
74
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
75
  "branchcode",
76
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
77
  "title",
78
  { data_type => "varchar", is_nullable => 1, size => 100 },
79
  "description",
80
  { data_type => "text", is_nullable => 1 },
81
  "created_on",
82
  {
83
    data_type => "datetime",
84
    datetime_undef_if_invalid => 1,
85
    is_nullable => 0,
86
  },
87
  "updated_on",
88
  {
89
    data_type => "datetime",
90
    datetime_undef_if_invalid => 1,
91
    is_nullable => 1,
92
  },
93
);
94
95
=head1 PRIMARY KEY
96
97
=over 4
98
99
=item * L</id>
100
101
=back
102
103
=cut
104
105
__PACKAGE__->set_primary_key("id");
106
107
=head1 RELATIONS
108
109
=head2 branchcode
110
111
Type: belongs_to
112
113
Related object: L<Koha::Schema::Result::Branch>
114
115
=cut
116
117
__PACKAGE__->belongs_to(
118
  "branchcode",
119
  "Koha::Schema::Result::Branch",
120
  { branchcode => "branchcode" },
121
  {
122
    is_deferrable => 1,
123
    join_type     => "LEFT",
124
    on_delete     => "CASCADE",
125
    on_update     => "CASCADE",
126
  },
127
);
128
129
=head2 library_groups
130
131
Type: has_many
132
133
Related object: L<Koha::Schema::Result::LibraryGroup>
134
135
=cut
136
137
__PACKAGE__->has_many(
138
  "library_groups",
139
  "Koha::Schema::Result::LibraryGroup",
140
  { "foreign.parent_id" => "self.id" },
141
  { cascade_copy => 0, cascade_delete => 0 },
142
);
143
144
=head2 parent
145
146
Type: belongs_to
147
148
Related object: L<Koha::Schema::Result::LibraryGroup>
149
150
=cut
151
152
__PACKAGE__->belongs_to(
153
  "parent",
154
  "Koha::Schema::Result::LibraryGroup",
155
  { id => "parent_id" },
156
  {
157
    is_deferrable => 1,
158
    join_type     => "LEFT",
159
    on_delete     => "CASCADE",
160
    on_update     => "CASCADE",
161
  },
162
);
163
164
165
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-11-02 13:23:16
166
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aQJgATq8JW4hCBFZfYus7w
167
168
169
# You can replace this text with custom code or comments, and it will be preserved on regeneration
170
1;

Return to bug 15707