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

(-)a/Koha/Schema/Result/Itemtype.pm (-3 / +46 lines)
Lines 30-35 __PACKAGE__->table("itemtypes"); Link Here
30
  is_nullable: 0
30
  is_nullable: 0
31
  size: 10
31
  size: 10
32
32
33
=head2 parent_type
34
35
  data_type: 'varchar'
36
  is_foreign_key: 1
37
  is_nullable: 1
38
  size: 10
39
33
=head2 description
40
=head2 description
34
41
35
  data_type: 'longtext'
42
  data_type: 'longtext'
Lines 129-134 __PACKAGE__->table("itemtypes"); Link Here
129
__PACKAGE__->add_columns(
136
__PACKAGE__->add_columns(
130
  "itemtype",
137
  "itemtype",
131
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
138
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
139
  "parent_type",
140
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
132
  "description",
141
  "description",
133
  { data_type => "longtext", is_nullable => 1 },
142
  { data_type => "longtext", is_nullable => 1 },
134
  "rentalcharge",
143
  "rentalcharge",
Lines 197-202 __PACKAGE__->has_many( Link Here
197
  { cascade_copy => 0, cascade_delete => 0 },
206
  { cascade_copy => 0, cascade_delete => 0 },
198
);
207
);
199
208
209
=head2 itemtypes
210
211
Type: has_many
212
213
Related object: L<Koha::Schema::Result::Itemtype>
214
215
=cut
216
217
__PACKAGE__->has_many(
218
  "itemtypes",
219
  "Koha::Schema::Result::Itemtype",
220
  { "foreign.parent_type" => "self.itemtype" },
221
  { cascade_copy => 0, cascade_delete => 0 },
222
);
223
200
=head2 itemtypes_branches
224
=head2 itemtypes_branches
201
225
202
Type: has_many
226
Type: has_many
Lines 227-232 __PACKAGE__->has_many( Link Here
227
  { cascade_copy => 0, cascade_delete => 0 },
251
  { cascade_copy => 0, cascade_delete => 0 },
228
);
252
);
229
253
254
=head2 parent_type
255
256
Type: belongs_to
257
258
Related object: L<Koha::Schema::Result::Itemtype>
259
260
=cut
261
262
__PACKAGE__->belongs_to(
263
  "parent_type",
264
  "Koha::Schema::Result::Itemtype",
265
  { itemtype => "parent_type" },
266
  {
267
    is_deferrable => 1,
268
    join_type     => "LEFT",
269
    on_delete     => "CASCADE",
270
    on_update     => "CASCADE",
271
  },
272
);
273
230
=head2 reserves
274
=head2 reserves
231
275
232
Type: has_many
276
Type: has_many
Lines 243-250 __PACKAGE__->has_many( Link Here
243
);
287
);
244
288
245
289
246
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-09 17:13:18
290
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-07-17 15:17:36
247
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7ojvTzsDvdHPAJMwJrAZ7A
291
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hYueR4cyonLynlcgm6THNg
248
292
249
__PACKAGE__->add_columns(
293
__PACKAGE__->add_columns(
250
    '+rentalcharge_hourly_calendar' => { is_boolean => 1 },
294
    '+rentalcharge_hourly_calendar' => { is_boolean => 1 },
251
- 

Return to bug 21946