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

(-)a/Koha/Schema/Result/Branch.pm (-2 / +17 lines)
Lines 502-507 __PACKAGE__->has_many( Link Here
502
  { cascade_copy => 0, cascade_delete => 0 },
502
  { cascade_copy => 0, cascade_delete => 0 },
503
);
503
);
504
504
505
=head2 stockrotationstages
506
507
Type: has_many
508
509
Related object: L<Koha::Schema::Result::Stockrotationstage>
510
511
=cut
512
513
__PACKAGE__->has_many(
514
  "stockrotationstages",
515
  "Koha::Schema::Result::Stockrotationstage",
516
  { "foreign.branchcode_id" => "self.branchcode" },
517
  { cascade_copy => 0, cascade_delete => 0 },
518
);
519
505
=head2 transport_cost_frombranches
520
=head2 transport_cost_frombranches
506
521
507
Type: has_many
522
Type: has_many
Lines 543-550 Composing rels: L</branchrelations> -> categorycode Link Here
543
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
558
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
544
559
545
560
546
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-24 13:56:21
561
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-12-12 17:01:45
547
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/9YwsU+GXK+fzc6IX2Tj5g
562
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ug0wv4pEEOJ8q8WuD+HQVA
548
563
549
564
550
# You can replace this text with custom code or comments, and it will be preserved on regeneration
565
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Item.pm (-2 / +18 lines)
Lines 674-682 __PACKAGE__->might_have( Link Here
674
  { cascade_copy => 0, cascade_delete => 0 },
674
  { cascade_copy => 0, cascade_delete => 0 },
675
);
675
);
676
676
677
=head2 stockrotationitem
677
678
678
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-24 13:56:21
679
Type: might_have
679
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Vf1sBZrpUo0Cvi896fjNuA
680
681
Related object: L<Koha::Schema::Result::Stockrotationitem>
682
683
=cut
684
685
__PACKAGE__->might_have(
686
  "stockrotationitem",
687
  "Koha::Schema::Result::Stockrotationitem",
688
  { "foreign.itemnumber_id" => "self.itemnumber" },
689
  { cascade_copy => 0, cascade_delete => 0 },
690
);
691
692
693
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-12-12 17:02:24
694
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oo/Eubwpc1tcaGAO9Oja1A
680
695
681
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
696
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
682
697
Lines 701-704 sub effective_itemtype { Link Here
701
    }
716
    }
702
}
717
}
703
718
719
# You can replace this text with custom code or comments, and it will be preserved on regeneration
704
1;
720
1;
(-)a/Koha/Schema/Result/Stockrotationitem.pm (+105 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::Stockrotationitem;
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::Stockrotationitem
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<stockrotationitems>
19
20
=cut
21
22
__PACKAGE__->table("stockrotationitems");
23
24
=head1 ACCESSORS
25
26
=head2 itemnumber_id
27
28
  data_type: 'integer'
29
  is_foreign_key: 1
30
  is_nullable: 0
31
32
=head2 stage_id
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 0
37
38
=head2 indemand
39
40
  data_type: 'tinyint'
41
  default_value: 0
42
  is_nullable: 0
43
44
=cut
45
46
__PACKAGE__->add_columns(
47
  "itemnumber_id",
48
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
49
  "stage_id",
50
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
51
  "indemand",
52
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
53
);
54
55
=head1 PRIMARY KEY
56
57
=over 4
58
59
=item * L</itemnumber_id>
60
61
=back
62
63
=cut
64
65
__PACKAGE__->set_primary_key("itemnumber_id");
66
67
=head1 RELATIONS
68
69
=head2 itemnumber
70
71
Type: belongs_to
72
73
Related object: L<Koha::Schema::Result::Item>
74
75
=cut
76
77
__PACKAGE__->belongs_to(
78
  "itemnumber",
79
  "Koha::Schema::Result::Item",
80
  { itemnumber => "itemnumber_id" },
81
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
82
);
83
84
=head2 stage
85
86
Type: belongs_to
87
88
Related object: L<Koha::Schema::Result::Stockrotationstage>
89
90
=cut
91
92
__PACKAGE__->belongs_to(
93
  "stage",
94
  "Koha::Schema::Result::Stockrotationstage",
95
  { stage_id => "stage_id" },
96
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
97
);
98
99
100
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-28 08:08:10
101
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KmGEiYEwfbYPZm6q5sXv+Q
102
103
104
# You can replace this text with custom code or comments, and it will be preserved on regeneration
105
1;
(-)a/Koha/Schema/Result/Stockrotationrota.pm (+105 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::Stockrotationrota;
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::Stockrotationrota
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<stockrotationrotas>
19
20
=cut
21
22
__PACKAGE__->table("stockrotationrotas");
23
24
=head1 ACCESSORS
25
26
=head2 rota_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 title
33
34
  data_type: 'varchar'
35
  is_nullable: 0
36
  size: 100
37
38
=head2 description
39
40
  data_type: 'text'
41
  is_nullable: 0
42
43
=head2 cyclical
44
45
  data_type: 'tinyint'
46
  default_value: 0
47
  is_nullable: 0
48
49
=head2 active
50
51
  data_type: 'tinyint'
52
  default_value: 0
53
  is_nullable: 0
54
55
=cut
56
57
__PACKAGE__->add_columns(
58
  "rota_id",
59
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
60
  "title",
61
  { data_type => "varchar", is_nullable => 0, size => 100 },
62
  "description",
63
  { data_type => "text", is_nullable => 0 },
64
  "cyclical",
65
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
66
  "active",
67
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
68
);
69
70
=head1 PRIMARY KEY
71
72
=over 4
73
74
=item * L</rota_id>
75
76
=back
77
78
=cut
79
80
__PACKAGE__->set_primary_key("rota_id");
81
82
=head1 RELATIONS
83
84
=head2 stockrotationstages
85
86
Type: has_many
87
88
Related object: L<Koha::Schema::Result::Stockrotationstage>
89
90
=cut
91
92
__PACKAGE__->has_many(
93
  "stockrotationstages",
94
  "Koha::Schema::Result::Stockrotationstage",
95
  { "foreign.rota_id" => "self.rota_id" },
96
  { cascade_copy => 0, cascade_delete => 0 },
97
);
98
99
100
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-17 16:18:21
101
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gglRP/Dh1RIu9eH834lStA
102
103
104
# You can replace this text with custom code or comments, and it will be preserved on regeneration
105
1;
(-)a/Koha/Schema/Result/Stockrotationstage.pm (-1 / +134 lines)
Line 0 Link Here
0
- 
1
use utf8;
2
package Koha::Schema::Result::Stockrotationstage;
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::Stockrotationstage
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<stockrotationstages>
19
20
=cut
21
22
__PACKAGE__->table("stockrotationstages");
23
24
=head1 ACCESSORS
25
26
=head2 stage_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 position
33
34
  data_type: 'integer'
35
  is_nullable: 0
36
37
=head2 rota_id
38
39
  data_type: 'integer'
40
  is_foreign_key: 1
41
  is_nullable: 0
42
43
=head2 branchcode_id
44
45
  data_type: 'varchar'
46
  is_foreign_key: 1
47
  is_nullable: 0
48
  size: 10
49
50
=head2 duration
51
52
  data_type: 'integer'
53
  default_value: 4
54
  is_nullable: 0
55
56
=cut
57
58
__PACKAGE__->add_columns(
59
  "stage_id",
60
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
61
  "position",
62
  { data_type => "integer", is_nullable => 0 },
63
  "rota_id",
64
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
65
  "branchcode_id",
66
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
67
  "duration",
68
  { data_type => "integer", default_value => 4, is_nullable => 0 },
69
);
70
71
=head1 PRIMARY KEY
72
73
=over 4
74
75
=item * L</stage_id>
76
77
=back
78
79
=cut
80
81
__PACKAGE__->set_primary_key("stage_id");
82
83
=head1 RELATIONS
84
85
=head2 branchcode
86
87
Type: belongs_to
88
89
Related object: L<Koha::Schema::Result::Branch>
90
91
=cut
92
93
__PACKAGE__->belongs_to(
94
  "branchcode",
95
  "Koha::Schema::Result::Branch",
96
  { branchcode => "branchcode_id" },
97
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
98
);
99
100
=head2 rota
101
102
Type: belongs_to
103
104
Related object: L<Koha::Schema::Result::Stockrotationrota>
105
106
=cut
107
108
__PACKAGE__->belongs_to(
109
  "rota",
110
  "Koha::Schema::Result::Stockrotationrota",
111
  { rota_id => "rota_id" },
112
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
113
);
114
115
=head2 stockrotationitems
116
117
Type: has_many
118
119
Related object: L<Koha::Schema::Result::Stockrotationitem>
120
121
=cut
122
123
__PACKAGE__->has_many(
124
  "stockrotationitems",
125
  "Koha::Schema::Result::Stockrotationitem",
126
  { "foreign.stage_id" => "self.stage_id" },
127
  { cascade_copy => 0, cascade_delete => 0 },
128
);
129
130
131
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-11-07 11:33:00
132
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zxUwd0UdMRN03yuSlf3RmA
133
134
1;

Return to bug 11897