Bug 22368: DBRev 18.12.00.024
[koha.git] / Koha / Schema / Result / CreatorBatch.pm
1 use utf8;
2 package Koha::Schema::Result::CreatorBatch;
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::CreatorBatch
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<creator_batches>
19
20 =cut
21
22 __PACKAGE__->table("creator_batches");
23
24 =head1 ACCESSORS
25
26 =head2 label_id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 =head2 batch_id
33
34   data_type: 'integer'
35   default_value: 1
36   is_nullable: 0
37
38 =head2 description
39
40   data_type: 'mediumtext'
41   is_nullable: 1
42
43 =head2 item_number
44
45   data_type: 'integer'
46   is_foreign_key: 1
47   is_nullable: 1
48
49 =head2 borrower_number
50
51   data_type: 'integer'
52   is_foreign_key: 1
53   is_nullable: 1
54
55 =head2 timestamp
56
57   data_type: 'timestamp'
58   datetime_undef_if_invalid: 1
59   default_value: current_timestamp
60   is_nullable: 0
61
62 =head2 branch_code
63
64   data_type: 'varchar'
65   default_value: 'NB'
66   is_foreign_key: 1
67   is_nullable: 0
68   size: 10
69
70 =head2 creator
71
72   data_type: 'char'
73   default_value: 'Labels'
74   is_nullable: 0
75   size: 15
76
77 =cut
78
79 __PACKAGE__->add_columns(
80   "label_id",
81   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
82   "batch_id",
83   { data_type => "integer", default_value => 1, is_nullable => 0 },
84   "description",
85   { data_type => "mediumtext", is_nullable => 1 },
86   "item_number",
87   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
88   "borrower_number",
89   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
90   "timestamp",
91   {
92     data_type => "timestamp",
93     datetime_undef_if_invalid => 1,
94     default_value => \"current_timestamp",
95     is_nullable => 0,
96   },
97   "branch_code",
98   {
99     data_type => "varchar",
100     default_value => "NB",
101     is_foreign_key => 1,
102     is_nullable => 0,
103     size => 10,
104   },
105   "creator",
106   {
107     data_type => "char",
108     default_value => "Labels",
109     is_nullable => 0,
110     size => 15,
111   },
112 );
113
114 =head1 PRIMARY KEY
115
116 =over 4
117
118 =item * L</label_id>
119
120 =back
121
122 =cut
123
124 __PACKAGE__->set_primary_key("label_id");
125
126 =head1 RELATIONS
127
128 =head2 borrower_number
129
130 Type: belongs_to
131
132 Related object: L<Koha::Schema::Result::Borrower>
133
134 =cut
135
136 __PACKAGE__->belongs_to(
137   "borrower_number",
138   "Koha::Schema::Result::Borrower",
139   { borrowernumber => "borrower_number" },
140   {
141     is_deferrable => 1,
142     join_type     => "LEFT",
143     on_delete     => "CASCADE",
144     on_update     => "CASCADE",
145   },
146 );
147
148 =head2 branch_code
149
150 Type: belongs_to
151
152 Related object: L<Koha::Schema::Result::Branch>
153
154 =cut
155
156 __PACKAGE__->belongs_to(
157   "branch_code",
158   "Koha::Schema::Result::Branch",
159   { branchcode => "branch_code" },
160   { is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" },
161 );
162
163 =head2 item_number
164
165 Type: belongs_to
166
167 Related object: L<Koha::Schema::Result::Item>
168
169 =cut
170
171 __PACKAGE__->belongs_to(
172   "item_number",
173   "Koha::Schema::Result::Item",
174   { itemnumber => "item_number" },
175   {
176     is_deferrable => 1,
177     join_type     => "LEFT",
178     on_delete     => "CASCADE",
179     on_update     => "RESTRICT",
180   },
181 );
182
183
184 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-24 17:34:29
185 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5SOMkaJ6IxGtnqtPVFpNtg
186
187
188 # You can replace this text with custom content, and it will be preserved on regeneration
189 1;