2 package Koha::Schema::Result::Stockrotationstage;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::Stockrotationstage
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<stockrotationstages>
22 __PACKAGE__->table("stockrotationstages");
58 __PACKAGE__->add_columns(
60 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
62 { data_type => "integer", is_nullable => 0 },
64 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
66 { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
68 { data_type => "integer", default_value => 4, is_nullable => 0 },
81 __PACKAGE__->set_primary_key("stage_id");
89 Related object: L<Koha::Schema::Result::Branch>
93 __PACKAGE__->belongs_to(
95 "Koha::Schema::Result::Branch",
96 { branchcode => "branchcode_id" },
97 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
104 Related object: L<Koha::Schema::Result::Stockrotationrota>
108 __PACKAGE__->belongs_to(
110 "Koha::Schema::Result::Stockrotationrota",
111 { rota_id => "rota_id" },
112 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
115 =head2 stockrotationitems
119 Related object: L<Koha::Schema::Result::Stockrotationitem>
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 },
131 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-09 15:50:42
132 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SKkedF8PL3DWma8kv8yYmg
134 # We use DBIx::Class::Ordered to handle stages manipulation.
135 __PACKAGE__->load_components(qw( Ordered ));
137 __PACKAGE__->grouping_column('rota_id'); # Our group_id
139 sub koha_object_class {
140 'Koha::StockRotationStage';
142 sub koha_objects_class {
143 'Koha::StockRotationStages';