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

(-)a/Koha/Schema/Result/CirculationRule.pm (-1 / +180 lines)
Line 0 Link Here
0
- 
1
use utf8;
2
package Koha::Schema::Result::CirculationRule;
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::CirculationRule
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<circulation_rules>
19
20
=cut
21
22
__PACKAGE__->table("circulation_rules");
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 branchcode
33
34
  data_type: 'varchar'
35
  is_foreign_key: 1
36
  is_nullable: 1
37
  size: 10
38
39
=head2 categorycode
40
41
  data_type: 'varchar'
42
  is_foreign_key: 1
43
  is_nullable: 1
44
  size: 10
45
46
=head2 itemtype
47
48
  data_type: 'varchar'
49
  is_foreign_key: 1
50
  is_nullable: 1
51
  size: 10
52
53
=head2 rule_name
54
55
  data_type: 'varchar'
56
  is_nullable: 0
57
  size: 32
58
59
=head2 rule_value
60
61
  data_type: 'varchar'
62
  is_nullable: 0
63
  size: 32
64
65
=cut
66
67
__PACKAGE__->add_columns(
68
  "id",
69
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
70
  "branchcode",
71
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
72
  "categorycode",
73
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
74
  "itemtype",
75
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
76
  "rule_name",
77
  { data_type => "varchar", is_nullable => 0, size => 32 },
78
  "rule_value",
79
  { data_type => "varchar", is_nullable => 0, size => 32 },
80
);
81
82
=head1 PRIMARY KEY
83
84
=over 4
85
86
=item * L</id>
87
88
=back
89
90
=cut
91
92
__PACKAGE__->set_primary_key("id");
93
94
=head1 UNIQUE CONSTRAINTS
95
96
=head2 C<branchcode_2>
97
98
=over 4
99
100
=item * L</branchcode>
101
102
=item * L</categorycode>
103
104
=item * L</itemtype>
105
106
=back
107
108
=cut
109
110
__PACKAGE__->add_unique_constraint("branchcode_2", ["branchcode", "categorycode", "itemtype"]);
111
112
=head1 RELATIONS
113
114
=head2 branchcode
115
116
Type: belongs_to
117
118
Related object: L<Koha::Schema::Result::Branch>
119
120
=cut
121
122
__PACKAGE__->belongs_to(
123
  "branchcode",
124
  "Koha::Schema::Result::Branch",
125
  { branchcode => "branchcode" },
126
  {
127
    is_deferrable => 1,
128
    join_type     => "LEFT",
129
    on_delete     => "CASCADE",
130
    on_update     => "CASCADE",
131
  },
132
);
133
134
=head2 categorycode
135
136
Type: belongs_to
137
138
Related object: L<Koha::Schema::Result::Branchcategory>
139
140
=cut
141
142
__PACKAGE__->belongs_to(
143
  "categorycode",
144
  "Koha::Schema::Result::Branchcategory",
145
  { categorycode => "categorycode" },
146
  {
147
    is_deferrable => 1,
148
    join_type     => "LEFT",
149
    on_delete     => "CASCADE",
150
    on_update     => "CASCADE",
151
  },
152
);
153
154
=head2 itemtype
155
156
Type: belongs_to
157
158
Related object: L<Koha::Schema::Result::Itemtype>
159
160
=cut
161
162
__PACKAGE__->belongs_to(
163
  "itemtype",
164
  "Koha::Schema::Result::Itemtype",
165
  { itemtype => "itemtype" },
166
  {
167
    is_deferrable => 1,
168
    join_type     => "LEFT",
169
    on_delete     => "CASCADE",
170
    on_update     => "CASCADE",
171
  },
172
);
173
174
175
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-03-06 17:39:41
176
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SZuAUJSu+FICBAxyxIcJQA
177
178
179
# You can replace this text with custom code or comments, and it will be preserved on regeneration
180
1;

Return to bug 18887