Bug 21797: Update two-column templates with Bootstrap grid: Acquisitions part 5
[koha.git] / Koha / Schema / Result / Aqbasket.pm
blobbb1e5a78aab9904ec2e169a3c3827c944bfe2b5b
1 use utf8;
2 package Koha::Schema::Result::Aqbasket;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Aqbasket
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<aqbasket>
20 =cut
22 __PACKAGE__->table("aqbasket");
24 =head1 ACCESSORS
26 =head2 basketno
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 basketname
34 data_type: 'varchar'
35 is_nullable: 1
36 size: 50
38 =head2 note
40 data_type: 'longtext'
41 is_nullable: 1
43 =head2 booksellernote
45 data_type: 'longtext'
46 is_nullable: 1
48 =head2 contractnumber
50 data_type: 'integer'
51 is_foreign_key: 1
52 is_nullable: 1
54 =head2 creationdate
56 data_type: 'date'
57 datetime_undef_if_invalid: 1
58 is_nullable: 1
60 =head2 closedate
62 data_type: 'date'
63 datetime_undef_if_invalid: 1
64 is_nullable: 1
66 =head2 booksellerid
68 data_type: 'integer'
69 default_value: 1
70 is_foreign_key: 1
71 is_nullable: 0
73 =head2 authorisedby
75 data_type: 'varchar'
76 is_nullable: 1
77 size: 10
79 =head2 booksellerinvoicenumber
81 data_type: 'longtext'
82 is_nullable: 1
84 =head2 basketgroupid
86 data_type: 'integer'
87 is_foreign_key: 1
88 is_nullable: 1
90 =head2 deliveryplace
92 data_type: 'varchar'
93 is_nullable: 1
94 size: 10
96 =head2 billingplace
98 data_type: 'varchar'
99 is_nullable: 1
100 size: 10
102 =head2 branch
104 data_type: 'varchar'
105 is_foreign_key: 1
106 is_nullable: 1
107 size: 10
109 =head2 is_standing
111 data_type: 'tinyint'
112 default_value: 0
113 is_nullable: 0
115 =head2 create_items
117 data_type: 'enum'
118 extra: {list => ["ordering","receiving","cataloguing"]}
119 is_nullable: 1
121 =cut
123 __PACKAGE__->add_columns(
124 "basketno",
125 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
126 "basketname",
127 { data_type => "varchar", is_nullable => 1, size => 50 },
128 "note",
129 { data_type => "longtext", is_nullable => 1 },
130 "booksellernote",
131 { data_type => "longtext", is_nullable => 1 },
132 "contractnumber",
133 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
134 "creationdate",
135 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
136 "closedate",
137 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
138 "booksellerid",
140 data_type => "integer",
141 default_value => 1,
142 is_foreign_key => 1,
143 is_nullable => 0,
145 "authorisedby",
146 { data_type => "varchar", is_nullable => 1, size => 10 },
147 "booksellerinvoicenumber",
148 { data_type => "longtext", is_nullable => 1 },
149 "basketgroupid",
150 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
151 "deliveryplace",
152 { data_type => "varchar", is_nullable => 1, size => 10 },
153 "billingplace",
154 { data_type => "varchar", is_nullable => 1, size => 10 },
155 "branch",
156 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
157 "is_standing",
158 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
159 "create_items",
161 data_type => "enum",
162 extra => { list => ["ordering", "receiving", "cataloguing"] },
163 is_nullable => 1,
167 =head1 PRIMARY KEY
169 =over 4
171 =item * L</basketno>
173 =back
175 =cut
177 __PACKAGE__->set_primary_key("basketno");
179 =head1 RELATIONS
181 =head2 aqbasketusers
183 Type: has_many
185 Related object: L<Koha::Schema::Result::Aqbasketuser>
187 =cut
189 __PACKAGE__->has_many(
190 "aqbasketusers",
191 "Koha::Schema::Result::Aqbasketuser",
192 { "foreign.basketno" => "self.basketno" },
193 { cascade_copy => 0, cascade_delete => 0 },
196 =head2 aqorders
198 Type: has_many
200 Related object: L<Koha::Schema::Result::Aqorder>
202 =cut
204 __PACKAGE__->has_many(
205 "aqorders",
206 "Koha::Schema::Result::Aqorder",
207 { "foreign.basketno" => "self.basketno" },
208 { cascade_copy => 0, cascade_delete => 0 },
211 =head2 basketgroupid
213 Type: belongs_to
215 Related object: L<Koha::Schema::Result::Aqbasketgroup>
217 =cut
219 __PACKAGE__->belongs_to(
220 "basketgroupid",
221 "Koha::Schema::Result::Aqbasketgroup",
222 { id => "basketgroupid" },
224 is_deferrable => 1,
225 join_type => "LEFT",
226 on_delete => "RESTRICT",
227 on_update => "CASCADE",
231 =head2 booksellerid
233 Type: belongs_to
235 Related object: L<Koha::Schema::Result::Aqbookseller>
237 =cut
239 __PACKAGE__->belongs_to(
240 "booksellerid",
241 "Koha::Schema::Result::Aqbookseller",
242 { id => "booksellerid" },
243 { is_deferrable => 1, on_delete => "RESTRICT", on_update => "CASCADE" },
246 =head2 branch
248 Type: belongs_to
250 Related object: L<Koha::Schema::Result::Branch>
252 =cut
254 __PACKAGE__->belongs_to(
255 "branch",
256 "Koha::Schema::Result::Branch",
257 { branchcode => "branch" },
259 is_deferrable => 1,
260 join_type => "LEFT",
261 on_delete => "SET NULL",
262 on_update => "CASCADE",
266 =head2 contractnumber
268 Type: belongs_to
270 Related object: L<Koha::Schema::Result::Aqcontract>
272 =cut
274 __PACKAGE__->belongs_to(
275 "contractnumber",
276 "Koha::Schema::Result::Aqcontract",
277 { contractnumber => "contractnumber" },
279 is_deferrable => 1,
280 join_type => "LEFT",
281 on_delete => "RESTRICT",
282 on_update => "RESTRICT",
286 =head2 edifact_messages
288 Type: has_many
290 Related object: L<Koha::Schema::Result::EdifactMessage>
292 =cut
294 __PACKAGE__->has_many(
295 "edifact_messages",
296 "Koha::Schema::Result::EdifactMessage",
297 { "foreign.basketno" => "self.basketno" },
298 { cascade_copy => 0, cascade_delete => 0 },
301 =head2 borrowernumbers
303 Type: many_to_many
305 Composing rels: L</aqbasketusers> -> borrowernumber
307 =cut
309 __PACKAGE__->many_to_many("borrowernumbers", "aqbasketusers", "borrowernumber");
312 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
313 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gSw/f4JmMBzEssEFRg2fAQ
316 # You can replace this text with custom code or comments, and it will be preserved on regeneration