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

(-)a/Koha/Schema/Result/Branch.pm (-2 / +17 lines)
Lines 457-462 __PACKAGE__->has_many( Link Here
457
  { cascade_copy => 0, cascade_delete => 0 },
457
  { cascade_copy => 0, cascade_delete => 0 },
458
);
458
);
459
459
460
=head2 library_groups
461
462
Type: has_many
463
464
Related object: L<Koha::Schema::Result::LibraryGroup>
465
466
=cut
467
468
__PACKAGE__->has_many(
469
  "library_groups",
470
  "Koha::Schema::Result::LibraryGroup",
471
  { "foreign.branchcode" => "self.branchcode" },
472
  { cascade_copy => 0, cascade_delete => 0 },
473
);
474
460
=head2 opac_news
475
=head2 opac_news
461
476
462
Type: has_many
477
Type: has_many
Lines 528-535 Composing rels: L</branchrelations> -> categorycode Link Here
528
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
543
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
529
544
530
545
531
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2014-11-26 11:08:29
546
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-01-31 11:24:41
532
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FjNI9OEpa5OKfwwCkggu0w
547
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cjNvGZEBWP5dwD6WT1o5zw
533
548
534
549
535
# You can replace this text with custom code or comments, and it will be preserved on regeneration
550
# 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-01-31 11:24:41
166
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TkIS+b/bPrejn2zpPgfB8g
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