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

(-)a/Koha/Schema/Result/Branch.pm (+15 lines)
Lines 555-560 __PACKAGE__->has_many( Link Here
555
  { cascade_copy => 0, cascade_delete => 0 },
555
  { cascade_copy => 0, cascade_delete => 0 },
556
);
556
);
557
557
558
=head2 stockrotationstages
559
560
Type: has_many
561
562
Related object: L<Koha::Schema::Result::Stockrotationstage>
563
564
=cut
565
566
__PACKAGE__->has_many(
567
  "stockrotationstages",
568
  "Koha::Schema::Result::Stockrotationstage",
569
  { "foreign.branchcode_id" => "self.branchcode" },
570
  { cascade_copy => 0, cascade_delete => 0 },
571
);
572
558
=head2 transport_cost_frombranches
573
=head2 transport_cost_frombranches
559
574
560
Type: has_many
575
Type: has_many
(-)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 (+113 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
=head2 fresh
45
46
  data_type: 'tinyint'
47
  default_value: 0
48
  is_nullable: 0
49
50
=cut
51
52
__PACKAGE__->add_columns(
53
  "itemnumber_id",
54
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
55
  "stage_id",
56
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
57
  "indemand",
58
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
59
  "fresh",
60
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
61
);
62
63
=head1 PRIMARY KEY
64
65
=over 4
66
67
=item * L</itemnumber_id>
68
69
=back
70
71
=cut
72
73
__PACKAGE__->set_primary_key("itemnumber_id");
74
75
=head1 RELATIONS
76
77
=head2 itemnumber
78
79
Type: belongs_to
80
81
Related object: L<Koha::Schema::Result::Item>
82
83
=cut
84
85
__PACKAGE__->belongs_to(
86
  "itemnumber",
87
  "Koha::Schema::Result::Item",
88
  { itemnumber => "itemnumber_id" },
89
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
90
);
91
92
=head2 stage
93
94
Type: belongs_to
95
96
Related object: L<Koha::Schema::Result::Stockrotationstage>
97
98
=cut
99
100
__PACKAGE__->belongs_to(
101
  "stage",
102
  "Koha::Schema::Result::Stockrotationstage",
103
  { stage_id => "stage_id" },
104
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
105
);
106
107
108
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-04-04 12:16:10
109
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5IDh4gVR3uzLEdUPBfsHTA
110
111
112
# You can replace this text with custom code or comments, and it will be preserved on regeneration
113
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