613bb8a8911e8fec8f368bf83c4fecaffd385e9d
[koha-equinox.git] / Koha / Schema / Result / Stockrotationitem.pm
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 @ 2018-10-09 15:50:42
109 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gkOISrUyWYqUHtmqe7ZHug
110
111 __PACKAGE__->add_columns(
112   '+indemand' => { is_boolean => 1 },
113   '+fresh' => { is_boolean => 1 }
114 );
115
116 # You can replace this text with custom code or comments, and it will be preserved on regeneration
117 1;