Bug 7295: (follow-up) update DBIx::Class schema classes
[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 item_number
39
40   data_type: 'integer'
41   is_foreign_key: 1
42   is_nullable: 1
43
44 =head2 borrower_number
45
46   data_type: 'integer'
47   is_foreign_key: 1
48   is_nullable: 1
49
50 =head2 timestamp
51
52   data_type: 'timestamp'
53   datetime_undef_if_invalid: 1
54   default_value: current_timestamp
55   is_nullable: 0
56
57 =head2 branch_code
58
59   data_type: 'varchar'
60   default_value: 'NB'
61   is_foreign_key: 1
62   is_nullable: 0
63   size: 10
64
65 =head2 creator
66
67   data_type: 'char'
68   default_value: 'Labels'
69   is_nullable: 0
70   size: 15
71
72 =cut
73
74 __PACKAGE__->add_columns(
75   "label_id",
76   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
77   "batch_id",
78   { data_type => "integer", default_value => 1, is_nullable => 0 },
79   "item_number",
80   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
81   "borrower_number",
82   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
83   "timestamp",
84   {
85     data_type => "timestamp",
86     datetime_undef_if_invalid => 1,
87     default_value => \"current_timestamp",
88     is_nullable => 0,
89   },
90   "branch_code",
91   {
92     data_type => "varchar",
93     default_value => "NB",
94     is_foreign_key => 1,
95     is_nullable => 0,
96     size => 10,
97   },
98   "creator",
99   {
100     data_type => "char",
101     default_value => "Labels",
102     is_nullable => 0,
103     size => 15,
104   },
105 );
106
107 =head1 PRIMARY KEY
108
109 =over 4
110
111 =item * L</label_id>
112
113 =back
114
115 =cut
116
117 __PACKAGE__->set_primary_key("label_id");
118
119 =head1 RELATIONS
120
121 =head2 borrower_number
122
123 Type: belongs_to
124
125 Related object: L<Koha::Schema::Result::Borrower>
126
127 =cut
128
129 __PACKAGE__->belongs_to(
130   "borrower_number",
131   "Koha::Schema::Result::Borrower",
132   { borrowernumber => "borrower_number" },
133   {
134     is_deferrable => 1,
135     join_type     => "LEFT",
136     on_delete     => "CASCADE",
137     on_update     => "CASCADE",
138   },
139 );
140
141 =head2 branch_code
142
143 Type: belongs_to
144
145 Related object: L<Koha::Schema::Result::Branch>
146
147 =cut
148
149 __PACKAGE__->belongs_to(
150   "branch_code",
151   "Koha::Schema::Result::Branch",
152   { branchcode => "branch_code" },
153   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
154 );
155
156 =head2 item_number
157
158 Type: belongs_to
159
160 Related object: L<Koha::Schema::Result::Item>
161
162 =cut
163
164 __PACKAGE__->belongs_to(
165   "item_number",
166   "Koha::Schema::Result::Item",
167   { itemnumber => "item_number" },
168   {
169     is_deferrable => 1,
170     join_type     => "LEFT",
171     on_delete     => "CASCADE",
172     on_update     => "CASCADE",
173   },
174 );
175
176
177 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
178 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:w5Nfrm8a8ajsC0bLBACaWg
179
180
181 # You can replace this text with custom content, and it will be preserved on regeneration
182 1;